test_wrap_tool_call_uses_function_name_as_default() — langchain Function Reference
Architecture documentation for the test_wrap_tool_call_uses_function_name_as_default() function in test_wrap_tool_call.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c402e685_8691_4553_248b_c6dad4fd99a8["test_wrap_tool_call_uses_function_name_as_default()"] e783c6bd_e3d7_7d3b_e64d_d062c5c12013["test_wrap_tool_call.py"] c402e685_8691_4553_248b_c6dad4fd99a8 -->|defined in| e783c6bd_e3d7_7d3b_e64d_d062c5c12013 style c402e685_8691_4553_248b_c6dad4fd99a8 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 747–757
def test_wrap_tool_call_uses_function_name_as_default() -> None:
"""Test that wrap_tool_call uses function name as default middleware name."""
@wrap_tool_call
def my_custom_wrapper(
request: ToolCallRequest, handler: Callable[[ToolCallRequest], ToolMessage | Command[Any]]
) -> ToolMessage | Command[Any]:
return handler(request)
# Verify that function name is used as middleware class name
assert my_custom_wrapper.__class__.__name__ == "my_custom_wrapper"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_wrap_tool_call_uses_function_name_as_default() do?
test_wrap_tool_call_uses_function_name_as_default() 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_uses_function_name_as_default() defined?
test_wrap_tool_call_uses_function_name_as_default() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/core/test_wrap_tool_call.py at line 747.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free