test_runnable_branch_batch() — langchain Function Reference
Architecture documentation for the test_runnable_branch_batch() function in test_runnable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 388b25eb_5f7b_8bf0_d403_f62071fdfc90["test_runnable_branch_batch()"] 26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"] 388b25eb_5f7b_8bf0_d403_f62071fdfc90 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5 593bb72a_4695_6c93_b95c_e277aca006ae["batch()"] 388b25eb_5f7b_8bf0_d403_f62071fdfc90 -->|calls| 593bb72a_4695_6c93_b95c_e277aca006ae style 388b25eb_5f7b_8bf0_d403_f62071fdfc90 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_runnable.py lines 4562–4571
def test_runnable_branch_batch() -> None:
"""Test batch variant."""
# Test with single branch
branch = RunnableBranch[int, int](
(lambda x: x > 0 and x < 5, lambda x: x + 1),
(lambda x: x > 5, lambda x: x * 10),
lambda x: x - 1,
)
assert branch.batch([1, 10, 0]) == [2, 100, -1]
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_runnable_branch_batch() do?
test_runnable_branch_batch() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_runnable_branch_batch() defined?
test_runnable_branch_batch() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 4562.
What does test_runnable_branch_batch() call?
test_runnable_branch_batch() calls 1 function(s): batch.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free