test_parse_model_string_errors() — langchain Function Reference
Architecture documentation for the test_parse_model_string_errors() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2689dd17_4dff_1bb6_1953_b161dc3d7606["test_parse_model_string_errors()"] da0101ff_3641_29c7_9da2_59715316b6f2["test_base.py"] 2689dd17_4dff_1bb6_1953_b161dc3d7606 -->|defined in| da0101ff_3641_29c7_9da2_59715316b6f2 style 2689dd17_4dff_1bb6_1953_b161dc3d7606 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/embeddings/test_base.py lines 29–51
def test_parse_model_string_errors() -> None:
"""Test error cases for model string parsing."""
with pytest.raises(ValueError, match="Model name must be"):
_parse_model_string("just-a-model-name")
with pytest.raises(ValueError, match="Invalid model format "):
_parse_model_string("")
with pytest.raises(ValueError, match="is not supported"):
_parse_model_string(":model-name")
with pytest.raises(ValueError, match="Model name cannot be empty"):
_parse_model_string("openai:")
with pytest.raises(
ValueError,
match="Provider 'invalid-provider' is not supported",
):
_parse_model_string("invalid-provider:model-name")
for provider in _BUILTIN_PROVIDERS:
with pytest.raises(ValueError, match=f"{provider}"):
_parse_model_string("invalid-provider:model-name")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_parse_model_string_errors() do?
test_parse_model_string_errors() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/embeddings/test_base.py.
Where is test_parse_model_string_errors() defined?
test_parse_model_string_errors() is defined in libs/langchain_v1/tests/unit_tests/embeddings/test_base.py at line 29.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free