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

Function _assert_docs

python/tests/test_readonly_storage.py:96–100  ·  view source on GitHub ↗
(collection, expected)

Source from the content-addressed store, hash-verified

94
95
96def _assert_docs(collection, expected):
97 fetched = collection.fetch(["a", "b", "c"])
98 assert {key: doc.fields["value"] for key, doc in fetched.items()} == expected
99 assert collection.stats.doc_count == len(expected)
100 assert {doc.id for doc in collection.iter_docs()} == set(expected)
101
102
103@pytest.mark.parametrize("enable_mmap", [True, False])

Calls 3

iter_docsMethod · 0.80
setFunction · 0.50
fetchMethod · 0.45

Tested by

no test coverage detected