test_async_none_tools_emulates_all() — langchain Function Reference
Architecture documentation for the test_async_none_tools_emulates_all() function in test_tool_emulator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2ab0dd1c_28ed_c632_1b89_196126f1c1e1["test_async_none_tools_emulates_all()"] b8b6edb5_5f70_2c98_97cd_e94de900fbeb["TestLLMToolEmulatorAsync"] 2ab0dd1c_28ed_c632_1b89_196126f1c1e1 -->|defined in| b8b6edb5_5f70_2c98_97cd_e94de900fbeb style 2ab0dd1c_28ed_c632_1b89_196126f1c1e1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py lines 519–549
async def test_async_none_tools_emulates_all(self) -> None:
"""Test that None tools means ALL tools are emulated in async mode."""
agent_model = FakeModel(
messages=cycle(
[
AIMessage(
content="",
tool_calls=[
{"name": "get_weather", "id": "1", "args": {"location": "NYC"}}
],
),
AIMessage(content="Done."),
]
)
)
emulator_model = FakeEmulatorModel(responses=["Emulated: 65°F in NYC"])
# tools=None means emulate ALL tools
emulator = LLMToolEmulator(tools=None, model=emulator_model)
agent = create_agent(
model=agent_model,
tools=[get_weather],
middleware=[emulator],
)
result = await agent.ainvoke({"messages": [HumanMessage("What's the weather in NYC?")]})
# Should complete without raising NotImplementedError
assert isinstance(result["messages"][-1], AIMessage)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_async_none_tools_emulates_all() do?
test_async_none_tools_emulates_all() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py.
Where is test_async_none_tools_emulates_all() defined?
test_async_none_tools_emulates_all() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py at line 519.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free