test_runnable_branch_init() — langchain Function Reference
Architecture documentation for the test_runnable_branch_init() function in test_runnable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7bcb403c_b17d_f486_c77a_17fea1c2292e["test_runnable_branch_init()"] 26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"] 7bcb403c_b17d_f486_c77a_17fea1c2292e -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5 style 7bcb403c_b17d_f486_c77a_17fea1c2292e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_runnable.py lines 4459–4474
def test_runnable_branch_init() -> None:
"""Verify that runnable branch gets initialized properly."""
add = RunnableLambda[int, int](lambda x: x + 1)
condition = RunnableLambda[int, bool](lambda x: x > 0)
# Test failure with less than 2 branches
with pytest.raises(
ValueError, match="RunnableBranch requires at least two branches"
):
RunnableBranch((condition, add))
# Test failure with less than 2 branches
with pytest.raises(
ValueError, match="RunnableBranch requires at least two branches"
):
RunnableBranch(condition)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_runnable_branch_init() do?
test_runnable_branch_init() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_runnable_branch_init() defined?
test_runnable_branch_init() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 4459.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free