test_async_methods_delegate_to_sync() — langchain Function Reference
Architecture documentation for the test_async_methods_delegate_to_sync() function in test_shell_tool.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 493102ba_b4a4_2daa_6143_fb25f90a5aab["test_async_methods_delegate_to_sync()"] f21fd460_1d0c_cb92_cfa1_eae0890e2f58["test_shell_tool.py"] 493102ba_b4a4_2daa_6143_fb25f90a5aab -->|defined in| f21fd460_1d0c_cb92_cfa1_eae0890e2f58 1bc202d6_8b54_02e9_fadd_ff3171c38a75["_empty_state()"] 493102ba_b4a4_2daa_6143_fb25f90a5aab -->|calls| 1bc202d6_8b54_02e9_fadd_ff3171c38a75 style 493102ba_b4a4_2daa_6143_fb25f90a5aab fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py lines 438–452
async def test_async_methods_delegate_to_sync(tmp_path: Path) -> None:
"""Test that async methods properly delegate to sync methods."""
middleware = ShellToolMiddleware(workspace_root=tmp_path / "workspace")
try:
state = _empty_state()
# Test abefore_agent
updates = await middleware.abefore_agent(state, Runtime())
if updates:
state.update(cast("ShellToolState", updates))
# Test aafter_agent
await middleware.aafter_agent(state, Runtime())
finally:
pass
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_async_methods_delegate_to_sync() do?
test_async_methods_delegate_to_sync() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py.
Where is test_async_methods_delegate_to_sync() defined?
test_async_methods_delegate_to_sync() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py at line 438.
What does test_async_methods_delegate_to_sync() call?
test_async_methods_delegate_to_sync() calls 1 function(s): _empty_state.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free