MCPcopy Create free account
hub / github.com/alibaba/zvec / test_collection_query

Method test_collection_query

python/tests/test_collection.py:881–891  ·  view source on GitHub ↗
(self, collection_with_single_doc: Collection, single_doc)

Source from the content-addressed store, hash-verified

879 assert len(result) == 0
880
881 def test_collection_query(self, collection_with_single_doc: Collection, single_doc):
882 result = collection_with_single_doc.query()
883 assert len(result) == 1
884 doc = result[0]
885 assert doc.id == single_doc.id
886 assert "dense" not in doc.field_names()
887 assert "sparse" not in doc.field_names()
888 field_without_vector = single_doc.field_names()
889 assert set(doc.field_names()) == set(field_without_vector)
890 for name in field_without_vector:
891 assert doc.field(name) == single_doc.field(name)
892
893 def test_collection_query_with_include_vector(
894 self, collection_with_single_doc: Collection, single_doc

Callers

nothing calls this directly

Calls 4

field_namesMethod · 0.80
setFunction · 0.50
queryMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected