Home / Function/ test_atransform_of_runnable_lambda_with_dicts() — langchain Function Reference

test_atransform_of_runnable_lambda_with_dicts() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_runnable.py lines 5486–5502

async def test_atransform_of_runnable_lambda_with_dicts() -> None:
    async def identity(x: dict[str, str]) -> dict[str, str]:
        """Return x."""
        return x

    runnable = RunnableLambda(identity)

    async def chunk_iterator() -> AsyncIterator[dict[str, str]]:
        yield {"foo": "a"}
        yield {"foo": "n"}

    chunks = [chunk async for chunk in runnable.atransform(chunk_iterator())]
    assert chunks == [{"foo": "n"}]

    seq = runnable | runnable
    chunks = [chunk async for chunk in seq.atransform(chunk_iterator())]
    assert chunks == [{"foo": "n"}]

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free