test_ascoped_full_fails_with_bad_source_ids() — langchain Function Reference
Architecture documentation for the test_ascoped_full_fails_with_bad_source_ids() function in test_indexing.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 88d866c5_c2aa_3faa_b3e8_36200b767d33["test_ascoped_full_fails_with_bad_source_ids()"] 576ad89d_c8dc_eddf_9cd2_c8ae0e7c9978["test_indexing.py"] 88d866c5_c2aa_3faa_b3e8_36200b767d33 -->|defined in| 576ad89d_c8dc_eddf_9cd2_c8ae0e7c9978 style 88d866c5_c2aa_3faa_b3e8_36200b767d33 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/indexing/test_indexing.py lines 972–1019
async def test_ascoped_full_fails_with_bad_source_ids(
arecord_manager: InMemoryRecordManager, vector_store: InMemoryVectorStore
) -> None:
"""Test Indexing with scoped_full 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="scoped_full",
key_encoder="sha256",
)
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="scoped_full",
source_id_key="source",
key_encoder="sha256",
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ascoped_full_fails_with_bad_source_ids() do?
test_ascoped_full_fails_with_bad_source_ids() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/indexing/test_indexing.py.
Where is test_ascoped_full_fails_with_bad_source_ids() defined?
test_ascoped_full_fails_with_bad_source_ids() is defined in libs/core/tests/unit_tests/indexing/test_indexing.py at line 972.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free