Home / Function/ test_default_model_used_when_none() — langchain Function Reference

test_default_model_used_when_none() — langchain Function Reference

Architecture documentation for the test_default_model_used_when_none() function in test_tool_emulator.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  64be2011_c59b_541f_c8bd_1a931b36201a["test_default_model_used_when_none()"]
  b7251e9a_e972_0104_74b3_75fbbecbaa7b["TestLLMToolEmulatorModelConfiguration"]
  64be2011_c59b_541f_c8bd_1a931b36201a -->|defined in| b7251e9a_e972_0104_74b3_75fbbecbaa7b
  style 64be2011_c59b_541f_c8bd_1a931b36201a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py lines 408–418

    def test_default_model_used_when_none(self) -> None:
        """Test that default model is used when model=None."""
        # Just test that initialization doesn't fail - don't require anthropic package
        # The actual default model requires langchain_anthropic which may not be installed
        try:
            emulator = LLMToolEmulator(tools=["get_weather"], model=None)
            assert emulator.model is not None
        except ImportError:
            # If anthropic isn't installed, that's fine for this unit test
            # The integration tests will verify the full functionality
            pass

Domain

Subdomains

Frequently Asked Questions

What does test_default_model_used_when_none() do?
test_default_model_used_when_none() 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_default_model_used_when_none() defined?
test_default_model_used_when_none() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py at line 408.

Analyze Your Own Codebase

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

Try Supermodel Free