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

Method test_readonly

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

Source from the content-addressed store, hash-verified

109 assert field.index_param.ef_construction == 300
110
111 def test_readonly(self):
112 field = VectorSchema(
113 name="vector",
114 dimension=128,
115 data_type=DataType.VECTOR_INT8,
116 )
117
118 import sys
119
120 if sys.version_info >= (3, 11):
121 match_pattern = r"(can't set attribute|has no setter|readonly attribute)"
122 else:
123 match_pattern = r"can't set attribute"
124 with pytest.raises(AttributeError, match=match_pattern):
125 field.dimension = 4
126
127
128# ----------------------------

Callers

nothing calls this directly

Calls 1

VectorSchemaClass · 0.90

Tested by

no test coverage detected