test_adeduplication() — langchain Function Reference
Architecture documentation for the test_adeduplication() function in test_indexing.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4fd39cbd_a04e_e00f_ffd5_4026dc8fb04e["test_adeduplication()"] a9fb4c74_0865_0941_ade3_563a79762cee["test_indexing.py"] 4fd39cbd_a04e_e00f_ffd5_4026dc8fb04e -->|defined in| a9fb4c74_0865_0941_ade3_563a79762cee style 4fd39cbd_a04e_e00f_ffd5_4026dc8fb04e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/indexing/test_indexing.py lines 2027–2054
async def test_adeduplication(
arecord_manager: InMemoryRecordManager, vector_store: VectorStore
) -> None:
"""Check edge case when loader returns no new docs."""
docs = [
Document(
page_content="This is a test document.",
metadata={"source": "1"},
),
Document(
page_content="This is a test document.",
metadata={"source": "1"},
),
]
# Should result in only a single document being added
assert await aindex(
docs,
arecord_manager,
vector_store,
cleanup="full",
key_encoder="sha256",
) == {
"num_added": 1,
"num_deleted": 0,
"num_skipped": 1,
"num_updated": 0,
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_adeduplication() do?
test_adeduplication() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/indexing/test_indexing.py.
Where is test_adeduplication() defined?
test_adeduplication() is defined in libs/core/tests/unit_tests/indexing/test_indexing.py at line 2027.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free