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

Method test_custom

python/tests/test_schema.py:96–109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 assert field.index_param.metric_type == MetricType.IP
95
96 def test_custom(self):
97 field = VectorSchema(
98 name="vector",
99 data_type=DataType.VECTOR_INT8,
100 dimension=512,
101 index_param=HnswIndexParam(
102 metric_type=MetricType.COSINE, m=15, ef_construction=300
103 ),
104 )
105 assert field.name == "vector"
106 assert field.data_type == DataType.VECTOR_INT8
107 assert field.index_param.metric_type == MetricType.COSINE
108 assert field.index_param.m == 15
109 assert field.index_param.ef_construction == 300
110
111 def test_readonly(self):
112 field = VectorSchema(

Callers

nothing calls this directly

Calls 1

VectorSchemaClass · 0.90

Tested by

no test coverage detected