Home / Function/ test_async_retriever() — langchain Function Reference

test_async_retriever() — langchain Function Reference

Architecture documentation for the test_async_retriever() function in test_in_memory_indexer.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ff42a506_ef15_162a_750b_87024302838f["test_async_retriever()"]
  390bcc77_16e2_f05c_9a58_c412fadbb507["test_in_memory_indexer.py"]
  ff42a506_ef15_162a_750b_87024302838f -->|defined in| 390bcc77_16e2_f05c_9a58_c412fadbb507
  style ff42a506_ef15_162a_750b_87024302838f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/indexing/test_in_memory_indexer.py lines 42–50

async def test_async_retriever() -> None:
    index = InMemoryDocumentIndex()
    documents = [
        Document(id="1", page_content="hello world"),
        Document(id="2", page_content="goodbye cat"),
    ]
    await index.aupsert(documents)
    assert (await index.ainvoke("hello")) == [documents[0], documents[1]]
    assert (await index.ainvoke("cat")) == [documents[1], documents[0]]

Domain

Subdomains

Frequently Asked Questions

What does test_async_retriever() do?
test_async_retriever() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/indexing/test_in_memory_indexer.py.
Where is test_async_retriever() defined?
test_async_retriever() is defined in libs/core/tests/unit_tests/indexing/test_in_memory_indexer.py at line 42.

Analyze Your Own Codebase

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

Try Supermodel Free