Home / Function/ test_wrap_tool_call_with_custom_name() — langchain Function Reference

test_wrap_tool_call_with_custom_name() — langchain Function Reference

Architecture documentation for the test_wrap_tool_call_with_custom_name() function in test_wrap_tool_call.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  93865b76_b9e0_887b_b479_3db201b6389d["test_wrap_tool_call_with_custom_name()"]
  e783c6bd_e3d7_7d3b_e64d_d062c5c12013["test_wrap_tool_call.py"]
  93865b76_b9e0_887b_b479_3db201b6389d -->|defined in| e783c6bd_e3d7_7d3b_e64d_d062c5c12013
  style 93865b76_b9e0_887b_b479_3db201b6389d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_tool_call.py lines 463–473

def test_wrap_tool_call_with_custom_name() -> None:
    """Test wrap_tool_call decorator with custom middleware name."""

    @wrap_tool_call(name="CustomToolWrapper")
    def my_wrapper(
        request: ToolCallRequest, handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]]
    ) -> ToolMessage | Command[Any]:
        return handler(request)

    # Verify custom name was applied
    assert my_wrapper.__class__.__name__ == "CustomToolWrapper"

Domain

Subdomains

Frequently Asked Questions

What does test_wrap_tool_call_with_custom_name() do?
test_wrap_tool_call_with_custom_name() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_tool_call.py.
Where is test_wrap_tool_call_with_custom_name() defined?
test_wrap_tool_call_with_custom_name() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_tool_call.py at line 463.

Analyze Your Own Codebase

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

Try Supermodel Free