Home / Function/ test_error() — langchain Function Reference

test_error() — langchain Function Reference

Architecture documentation for the test_error() function in test_llm_math.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7cef5b6d_6a88_9a9b_e672_68493459ec27["test_error()"]
  4e98a726_3502_d5b4_fa54_cc66e117b849["test_llm_math.py"]
  7cef5b6d_6a88_9a9b_e672_68493459ec27 -->|defined in| 4e98a726_3502_d5b4_fa54_cc66e117b849
  style 7cef5b6d_6a88_9a9b_e672_68493459ec27 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/chains/test_llm_math.py lines 40–43

def test_error(fake_llm_math_chain: LLMMathChain) -> None:
    """Test question that raises error."""
    with pytest.raises(ValueError, match="unknown format from LLM: foo"):
        fake_llm_math_chain.run("foo")

Domain

Subdomains

Frequently Asked Questions

What does test_error() do?
test_error() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_llm_math.py.
Where is test_error() defined?
test_error() is defined in libs/langchain/tests/unit_tests/chains/test_llm_math.py at line 40.

Analyze Your Own Codebase

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

Try Supermodel Free