def test_get_example_for_tools_single_tool_is_finish():
    """Test get_example_for_tools with only the finish tool."""
    tools = [
        {
            'type': 'function',
            'function': {
                'name': 'finish',
                'description': 'Finish the interaction when the task is complete.',
            },
        }
    ]
    example = get_example_for_tools(tools)
    assert example.startswith(
        "Here's a running example of how to perform a task with the provided tools."
    )
    assert (
        'USER: Create a list of numbers from 1 to 10, and display them in a web page at port 5000.'
        in example
    )
    assert TOOL_EXAMPLES['finish']['task_completed'] in example
    assert TOOL_EXAMPLES['execute_bash']['check_dir'] not in example
    assert TOOL_EXAMPLES['str_replace_editor']['create_file'] not in example
    assert TOOL_EXAMPLES['browser']['view_page'] not in example
Test get_example_for_tools with only the finish tool.
tests/unit/test_llm_fncall_converter.py