Home / Function/ test_runnable_branch_init_coercion() — langchain Function Reference

test_runnable_branch_init_coercion() — langchain Function Reference

Architecture documentation for the test_runnable_branch_init_coercion() function in test_runnable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  88903b42_3004_cf92_d204_b56501d82865["test_runnable_branch_init_coercion()"]
  26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"]
  88903b42_3004_cf92_d204_b56501d82865 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5
  style 88903b42_3004_cf92_d204_b56501d82865 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 4496–4508

def test_runnable_branch_init_coercion(branches: Sequence[Any]) -> None:
    """Verify that runnable branch gets initialized properly."""
    runnable = RunnableBranch[int, int](*branches)
    for branch in runnable.branches:
        condition, body = branch
        assert isinstance(condition, Runnable)
        assert isinstance(body, Runnable)

    assert isinstance(runnable.default, Runnable)
    assert _schema(runnable.input_schema) == {
        "title": "RunnableBranchInput",
        "type": "integer",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_runnable_branch_init_coercion() do?
test_runnable_branch_init_coercion() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_runnable_branch_init_coercion() defined?
test_runnable_branch_init_coercion() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 4496.

Analyze Your Own Codebase

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

Try Supermodel Free