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

Method test_default

python/tests/test_convert.py:15–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13# ----------------------------
14class TestConvertCppDoc:
15 def test_default(self):
16 doc = Doc(id="1")
17 schema = CollectionSchema(
18 name="test_collection",
19 fields=FieldSchema("name", DataType.STRING),
20 )
21
22 cpp_doc = convert_to_cpp_doc(doc, collection_schema=schema)
23
24 assert cpp_doc is not None
25 assert cpp_doc.pk() == doc.id
26
27 def test_with_field_notin_schema(self):
28 doc = Doc(id="1", fields={"name": "Tom"})

Callers

nothing calls this directly

Calls 5

DocClass · 0.90
CollectionSchemaClass · 0.90
FieldSchemaClass · 0.90
convert_to_cpp_docFunction · 0.90
pkMethod · 0.80

Tested by

no test coverage detected