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

Method test_init

python/tests/test_query_executor.py:61–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59# ----------------------------
60class TestQuery:
61 def test_init(self):
62 query = Query(field_name="test_field")
63 assert query.field_name == "test_field"
64 assert query.id is None
65 assert query.vector is None
66 assert query.param is None
67
68 param = HnswQueryParam()
69 query = Query(
70 field_name="test_field", id="test_id", vector=[1, 2, 3], param=param
71 )
72 assert query.field_name == "test_field"
73 assert query.id == "test_id"
74 assert query.vector == [1, 2, 3]
75 assert query.param == param
76
77 def test_has_id(self):
78 query = Query(field_name="test_field")

Callers

nothing calls this directly

Calls 1

QueryClass · 0.90

Tested by

no test coverage detected