Home / Function/ test_run_with_callback() — langchain Function Reference

test_run_with_callback() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/chains/test_base.py lines 170–180

def test_run_with_callback() -> None:
    """Test run method works when callback manager is passed."""
    handler = FakeCallbackHandler()
    chain = FakeChain(
        callbacks=[handler],
    )
    output = chain.run("bar")
    assert output == "baz"
    assert handler.starts == 1
    assert handler.ends == 1
    assert handler.errors == 0

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free