test_representation_of_runnables() — langchain Function Reference
Architecture documentation for the test_representation_of_runnables() function in test_runnable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD af49a95f_3504_fc88_ff62_08b79e80ada8["test_representation_of_runnables()"] 26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"] af49a95f_3504_fc88_ff62_08b79e80ada8 -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5 style af49a95f_3504_fc88_ff62_08b79e80ada8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_runnable.py lines 4801–4830
def test_representation_of_runnables() -> None:
"""Test representation of runnables."""
runnable = RunnableLambda[int, int](lambda x: x * 2)
assert repr(runnable) == "RunnableLambda(lambda x: x * 2)"
def f(_: int) -> int:
"""Return 2."""
return 2
assert repr(RunnableLambda(func=f)) == "RunnableLambda(f)"
async def af(_: int) -> int:
"""Return 2."""
return 2
assert repr(RunnableLambda(func=f, afunc=af)) == "RunnableLambda(f)"
assert repr(
RunnableLambda(lambda x: x * 2)
| {
"a": RunnableLambda(lambda x: x * 2),
"b": RunnableLambda(lambda x: x * 3),
}
) == (
"RunnableLambda(lambda x: x * 2)\n"
"| {\n"
" a: RunnableLambda(...),\n"
" b: RunnableLambda(...)\n"
" }"
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_representation_of_runnables() do?
test_representation_of_runnables() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_representation_of_runnables() defined?
test_representation_of_runnables() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 4801.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free