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

test_function_call_with_valid_input() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/lib/tools/test_functions.py lines 79–87

    def test_function_call_with_valid_input(self) -> None:
        def add_numbers(a: int, b: int) -> str:
            """Add two numbers together."""
            return str(a + b)

        function_tool = beta_tool(add_numbers)
        result = function_tool.call({"a": 5, "b": 3})

        assert result == "8"

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free