Home / Function/ test_ainvoke_astream_passthrough_assign_trace() — langchain Function Reference

test_ainvoke_astream_passthrough_assign_trace() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 5396–5413

async def test_ainvoke_astream_passthrough_assign_trace() -> None:
    def idchain_sync(_input: dict, /) -> bool:
        return False

    chain = RunnablePassthrough.assign(urls=idchain_sync)

    tracer = FakeTracer()
    await chain.ainvoke({"example": [1, 2, 3]}, {"callbacks": [tracer]})

    assert tracer.runs[0].name == "RunnableAssign<urls>"
    assert tracer.runs[0].child_runs[0].name == "RunnableParallel<urls>"

    tracer = FakeTracer()
    async for _ in chain.astream({"example": [1, 2, 3]}, {"callbacks": [tracer]}):
        pass

    assert tracer.runs[0].name == "RunnableAssign<urls>"
    assert tracer.runs[0].child_runs[0].name == "RunnableParallel<urls>"

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free