test_ainvoke_on_returned_runnable() — langchain Function Reference
Architecture documentation for the test_ainvoke_on_returned_runnable() function in test_runnable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9319b071_bad8_6738_5b20_6fada02b030f["test_ainvoke_on_returned_runnable()"] 26df6ad8_0189_51d0_c3c1_6c3248893ff5["test_runnable.py"] 9319b071_bad8_6738_5b20_6fada02b030f -->|defined in| 26df6ad8_0189_51d0_c3c1_6c3248893ff5 style 9319b071_bad8_6738_5b20_6fada02b030f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_runnable.py lines 5355–5373
async def test_ainvoke_on_returned_runnable() -> None:
"""Test ainvoke on a returned runnable.
Verify that a runnable returned by a sync runnable in the async path will
be runthroughaasync path (issue #13407).
"""
def idchain_sync(_input: dict[str, Any], /) -> bool:
return False
async def idchain_async(_input: dict[str, Any], /) -> bool:
return True
idchain = RunnableLambda(func=idchain_sync, afunc=idchain_async)
def func(_input: dict[str, Any], /) -> Runnable[dict[str, Any], bool]:
return idchain
assert await RunnableLambda(func).ainvoke({})
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ainvoke_on_returned_runnable() do?
test_ainvoke_on_returned_runnable() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_runnable.py.
Where is test_ainvoke_on_returned_runnable() defined?
test_ainvoke_on_returned_runnable() is defined in libs/core/tests/unit_tests/runnables/test_runnable.py at line 5355.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free