test(backends): dedup update-length-validation tests
24bf97b (network-download fix) and my earlier Copilot-review commit both
added tests for the same ValueError. Keep the broader one that covers
both 'documents length' and 'metadatas length' mismatches; drop the
narrower duplicate.
This commit is contained in:
@@ -198,20 +198,6 @@ def test_query_empty_preserves_embeddings_outer_shape_when_requested():
|
|||||||
assert not_requested.embeddings is None
|
assert not_requested.embeddings is None
|
||||||
|
|
||||||
|
|
||||||
def test_base_collection_update_default_validates_list_lengths():
|
|
||||||
from mempalace.backends.base import BaseCollection
|
|
||||||
|
|
||||||
collection = ChromaCollection(_FakeCollection())
|
|
||||||
|
|
||||||
# Mismatched documents length → clear ValueError, not silent merge.
|
|
||||||
with pytest.raises(ValueError, match="documents length"):
|
|
||||||
BaseCollection.update(
|
|
||||||
collection,
|
|
||||||
ids=["1", "2"],
|
|
||||||
documents=["only-one"],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_chroma_cache_invalidates_when_db_file_missing(tmp_path):
|
def test_chroma_cache_invalidates_when_db_file_missing(tmp_path):
|
||||||
"""A palace rebuild that removes chroma.sqlite3 must drop the stale cache.
|
"""A palace rebuild that removes chroma.sqlite3 must drop the stale cache.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user