(self)
| 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 | # ---------------------------- |
nothing calls this directly
no test coverage detected