_compare_run_with_error() — langchain Function Reference
Architecture documentation for the _compare_run_with_error() function in test_base_tracer.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6e040bd9_776b_69d1_2348_538d6cc259ae["_compare_run_with_error()"] 013f89c1_4436_b008_1552_7a3ea97dace9["test_base_tracer.py"] 6e040bd9_776b_69d1_2348_538d6cc259ae -->|defined in| 013f89c1_4436_b008_1552_7a3ea97dace9 4a01d419_8af9_b8ed_e9b2_6da7497ccf2d["test_tracer_llm_run_on_error()"] 4a01d419_8af9_b8ed_e9b2_6da7497ccf2d -->|calls| 6e040bd9_776b_69d1_2348_538d6cc259ae 69c77c29_082d_6de9_d3be_b64abebe6e9b["test_tracer_llm_run_on_error_callback()"] 69c77c29_082d_6de9_d3be_b64abebe6e9b -->|calls| 6e040bd9_776b_69d1_2348_538d6cc259ae 0daad3a1_a6a6_906c_924f_dac02fc76514["test_tracer_chain_run_on_error()"] 0daad3a1_a6a6_906c_924f_dac02fc76514 -->|calls| 6e040bd9_776b_69d1_2348_538d6cc259ae b4d3ea60_8565_c382_1a4f_cd9944f453cb["test_tracer_tool_run_on_error()"] b4d3ea60_8565_c382_1a4f_cd9944f453cb -->|calls| 6e040bd9_776b_69d1_2348_538d6cc259ae a7dbb1f1_2e2c_c851_27e9_890c6e77f883["test_tracer_nested_runs_on_error()"] a7dbb1f1_2e2c_c851_27e9_890c6e77f883 -->|calls| 6e040bd9_776b_69d1_2348_538d6cc259ae style 6e040bd9_776b_69d1_2348_538d6cc259ae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/tracers/test_base_tracer.py lines 41–58
def _compare_run_with_error(run: Any, expected_run: Any) -> None:
if run.child_runs:
assert len(expected_run.child_runs) == len(run.child_runs)
for received, expected in zip(
run.child_runs, expected_run.child_runs, strict=False
):
_compare_run_with_error(received, expected)
received = pydantic_to_dict(run, exclude={"child_runs"})
received_err = received.pop("error")
expected = pydantic_to_dict(expected_run, exclude={"child_runs"})
expected_err = expected.pop("error")
assert received == expected
if expected_err is not None:
assert received_err is not None
assert expected_err in received_err
else:
assert received_err is None
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _compare_run_with_error() do?
_compare_run_with_error() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/tracers/test_base_tracer.py.
Where is _compare_run_with_error() defined?
_compare_run_with_error() is defined in libs/core/tests/unit_tests/tracers/test_base_tracer.py at line 41.
What calls _compare_run_with_error()?
_compare_run_with_error() is called by 5 function(s): test_tracer_chain_run_on_error, test_tracer_llm_run_on_error, test_tracer_llm_run_on_error_callback, test_tracer_nested_runs_on_error, test_tracer_tool_run_on_error.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free