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

test_decorator_with_custom_parameters() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

tests/lib/tools/test_functions.py lines 407–417

    def test_decorator_with_custom_parameters(self) -> None:
        """Test using @function_tool() decorator with custom name and description."""

        @beta_tool(name="custom_calculator", description="A custom calculator function")
        def calculate(value: int) -> str:
            """Original description that should be overridden."""
            return str(value * 2)

        assert calculate.name == "custom_calculator"
        assert calculate.description == "A custom calculator function"
        assert calculate.call({"value": 5}) == "10"

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free