Home / Function/ test_run_with_callback_and_output_error() — langchain Function Reference

test_run_with_callback_and_output_error() — langchain Function Reference

Architecture documentation for the test_run_with_callback_and_output_error() function in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7197d161_bb9c_2401_1257_02d491737999["test_run_with_callback_and_output_error()"]
  cbc5b920_9825_eac5_8cc4_bc8187fb214c["test_base.py"]
  7197d161_bb9c_2401_1257_02d491737999 -->|defined in| cbc5b920_9825_eac5_8cc4_bc8187fb214c
  style 7197d161_bb9c_2401_1257_02d491737999 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/chains/test_base.py lines 230–245

def test_run_with_callback_and_output_error() -> None:
    """Test callback manager catches run validation output error."""
    handler = FakeCallbackHandler()
    chain = FakeChain(
        the_output_keys=["foo", "bar"],
        callbacks=[handler],
    )

    with pytest.raises(
        ValueError, match=re.escape("Missing some output keys: {'foo'}")
    ):
        chain("foo")

    assert handler.starts == 1
    assert handler.ends == 0
    assert handler.errors == 1

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free