test_aincremental_fails_with_bad_source_ids() — langchain Function Reference
Architecture documentation for the test_aincremental_fails_with_bad_source_ids() function in test_indexing.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7ef544aa_e45b_ce64_f9a0_7f009eecabfa["test_aincremental_fails_with_bad_source_ids()"] 9bc4e8b6_769a_ae11_3fc1_309cb678c248["test_indexing.py"] 7ef544aa_e45b_ce64_f9a0_7f009eecabfa -->|defined in| 9bc4e8b6_769a_ae11_3fc1_309cb678c248 style 7ef544aa_e45b_ce64_f9a0_7f009eecabfa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/indexes/test_indexing.py lines 462–508
async def test_aincremental_fails_with_bad_source_ids(
arecord_manager: SQLRecordManager,
vector_store: InMemoryVectorStore,
) -> None:
"""Test indexing with incremental deletion strategy."""
loader = ToyLoader(
documents=[
Document(
page_content="This is a test document.",
metadata={"source": "1"},
),
Document(
page_content="This is another document.",
metadata={"source": "2"},
),
Document(
page_content="This is yet another document.",
metadata={"source": None},
),
],
)
with pytest.raises(
ValueError,
match="Source id key is required when cleanup mode is incremental "
"or scoped_full",
):
# Should raise an error because no source id function was specified
await aindex(
loader,
arecord_manager,
vector_store,
cleanup="incremental",
)
with pytest.raises(
ValueError,
match="Source IDs are required when cleanup mode is incremental or scoped_full",
):
# Should raise an error because no source id function was specified
await aindex(
loader,
arecord_manager,
vector_store,
cleanup="incremental",
source_id_key="source",
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_aincremental_fails_with_bad_source_ids() do?
test_aincremental_fails_with_bad_source_ids() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py.
Where is test_aincremental_fails_with_bad_source_ids() defined?
test_aincremental_fails_with_bad_source_ids() is defined in libs/langchain/tests/unit_tests/indexes/test_indexing.py at line 462.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free