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

test_custom_input_schema_with_dict() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/lib/tools/test_functions.py lines 133–146

    def test_custom_input_schema_with_dict(self) -> None:
        def some_function(x: int) -> str:
            return str(x * 2)

        custom_schema: InputSchema = {
            "additionalProperties": False,
            "type": "object",
            "properties": {"x": {"type": "number", "description": "A number to double"}},
            "required": ["x"],
        }

        function_tool = beta_tool(some_function, input_schema=custom_schema)

        assert function_tool.input_schema == custom_schema

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free