Home / Function/ test_init_model_not_found() — langchain Function Reference

test_init_model_not_found() — langchain Function Reference

Architecture documentation for the test_init_model_not_found() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5a5ceaa4_157f_a6d1_b278_3c3a327136b0["test_init_model_not_found()"]
  71dcb56e_a445_727d_c4bb_5dc733f24038["test_chat_models.py"]
  5a5ceaa4_157f_a6d1_b278_3c3a327136b0 -->|defined in| 71dcb56e_a445_727d_c4bb_5dc733f24038
  style 5a5ceaa4_157f_a6d1_b278_3c3a327136b0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py lines 33–38

def test_init_model_not_found(mock_list: MagicMock) -> None:
    """Test that a ValueError is raised when the model is not found."""
    mock_list.side_effect = ValueError("Test model not found")
    with pytest.raises(ValueError) as excinfo:
        ChatOllama(model="non-existent-model", validate_model_on_init=True)
    assert "Test model not found" in str(excinfo.value)

Domain

Subdomains

Frequently Asked Questions

What does test_init_model_not_found() do?
test_init_model_not_found() is a function in the langchain codebase, defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py.
Where is test_init_model_not_found() defined?
test_init_model_not_found() is defined in libs/partners/ollama/tests/integration_tests/chat_models/test_chat_models.py at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free