Home / Function/ _assert_potential_error() — langchain Function Reference

_assert_potential_error() — langchain Function Reference

Architecture documentation for the _assert_potential_error() function in test_fallbacks.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a["_assert_potential_error()"]
  d62d478e_a330_c328_7da4_58e88d780807["test_fallbacks.py"]
  b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a -->|defined in| d62d478e_a330_c328_7da4_58e88d780807
  af592282_6535_32ff_1a6c_4b92cf373f69["test_invoke_with_exception_key()"]
  af592282_6535_32ff_1a6c_4b92cf373f69 -->|calls| b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a
  ac9f3fb6_212f_5556_6e7e_feeebdac3fd3["test_ainvoke_with_exception_key()"]
  ac9f3fb6_212f_5556_6e7e_feeebdac3fd3 -->|calls| b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a
  14b0ba24_86ad_edf7_3d03_e8df98f7d29a["test_batch()"]
  14b0ba24_86ad_edf7_3d03_e8df98f7d29a -->|calls| b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a
  2d240e6c_0dba_793d_c16e_cecb30f225e7["test_abatch()"]
  2d240e6c_0dba_793d_c16e_cecb30f225e7 -->|calls| b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a
  style b4df7c29_3d15_7d1f_4ec5_5bcda5d0c06a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_fallbacks.py lines 117–122

def _assert_potential_error(actual: list[Any], expected: list[Any]) -> None:
    for x, y in zip(actual, expected, strict=False):
        if isinstance(x, Exception):
            assert isinstance(y, type(x))
        else:
            assert x == y

Subdomains

Frequently Asked Questions

What does _assert_potential_error() do?
_assert_potential_error() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_fallbacks.py.
Where is _assert_potential_error() defined?
_assert_potential_error() is defined in libs/core/tests/unit_tests/runnables/test_fallbacks.py at line 117.
What calls _assert_potential_error()?
_assert_potential_error() is called by 4 function(s): test_abatch, test_ainvoke_with_exception_key, test_batch, test_invoke_with_exception_key.

Analyze Your Own Codebase

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

Try Supermodel Free