Home / Function/ test_wrap_tool_call_with_tools_parameter() — langchain Function Reference

test_wrap_tool_call_with_tools_parameter() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d007e8b9_2672_599c_43b8_615cd02d3b0e["test_wrap_tool_call_with_tools_parameter()"]
  e783c6bd_e3d7_7d3b_e64d_d062c5c12013["test_wrap_tool_call.py"]
  d007e8b9_2672_599c_43b8_615cd02d3b0e -->|defined in| e783c6bd_e3d7_7d3b_e64d_d062c5c12013
  style d007e8b9_2672_599c_43b8_615cd02d3b0e 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 476–491

def test_wrap_tool_call_with_tools_parameter() -> None:
    """Test wrap_tool_call decorator with tools parameter."""

    @tool
    def extra_tool(value: str) -> str:
        """Extra tool registered with middleware."""
        return f"Extra: {value}"

    @wrap_tool_call(tools=[extra_tool])
    def wrapper_with_tools(
        request: ToolCallRequest, handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]]
    ) -> ToolMessage | Command[Any]:
        return handler(request)

    # Verify tools were registered
    assert wrapper_with_tools.tools == [extra_tool]

Domain

Subdomains

Frequently Asked Questions

What does test_wrap_tool_call_with_tools_parameter() do?
test_wrap_tool_call_with_tools_parameter() 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_tools_parameter() defined?
test_wrap_tool_call_with_tools_parameter() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_tool_call.py at line 476.

Analyze Your Own Codebase

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

Try Supermodel Free