Home / Function/ test_function_call_with_invalid_input() — anthropic-sdk-python Function Reference

test_function_call_with_invalid_input() — anthropic-sdk-python Function Reference

Architecture documentation for the test_function_call_with_invalid_input() function in test_functions.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  2994cf62_fcc7_d475_3de4_12161fde117b["test_function_call_with_invalid_input()"]
  e25ad18d_e1f6_726f_20bc_ac8e568d4e63["TestFunctionTool"]
  2994cf62_fcc7_d475_3de4_12161fde117b -->|defined in| e25ad18d_e1f6_726f_20bc_ac8e568d4e63
  style 2994cf62_fcc7_d475_3de4_12161fde117b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/lib/tools/test_functions.py lines 112–121

    def test_function_call_with_invalid_input(
        self, input_data: dict[str, Any], expected_error_type: type[BaseException], expected_error_msg: str
    ) -> None:
        def add_numbers(a: int, b: int) -> str:
            return str(a + b)

        function_tool = beta_tool(add_numbers)

        with pytest.raises(expected_error_type, match=expected_error_msg):
            function_tool.call(input_data)

Subdomains

Frequently Asked Questions

What does test_function_call_with_invalid_input() do?
test_function_call_with_invalid_input() is a function in the anthropic-sdk-python codebase, defined in tests/lib/tools/test_functions.py.
Where is test_function_call_with_invalid_input() defined?
test_function_call_with_invalid_input() is defined in tests/lib/tools/test_functions.py at line 112.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free