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

Method test_default

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

Source from the content-addressed store, hash-verified

396# ----------------------------
397class TestConvertPyDoc:
398 def test_default(self):
399 doc = _Doc()
400 doc.set_pk("1")
401 doc.set_score(1.0)
402
403 schema = CollectionSchema(
404 name="test_collection",
405 fields=FieldSchema("name", DataType.STRING),
406 )
407
408 py_doc = convert_to_py_doc(doc, schema)
409 assert py_doc.id == "1"
410 assert py_doc.score == 1.0
411
412 def test_with_scalar_fields(self):
413 schema = CollectionSchema(

Callers

nothing calls this directly

Calls 4

CollectionSchemaClass · 0.90
FieldSchemaClass · 0.90
convert_to_py_docFunction · 0.90
set_scoreMethod · 0.45

Tested by

no test coverage detected