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

Method test_readonly_attributes

python/tests/test_params.py:375–384  ·  view source on GitHub ↗
(self, attr)

Source from the content-addressed store, hash-verified

373
374 @pytest.mark.parametrize("attr", ["concurrency"])
375 def test_readonly_attributes(self, attr):
376 param = AddColumnOption()
377 import sys
378
379 if sys.version_info >= (3, 11):
380 match_pattern = r"(can't set attribute|has no setter|readonly attribute)"
381 else:
382 match_pattern = r"can't set attribute"
383 with pytest.raises(AttributeError, match=match_pattern):
384 setattr(param, attr, getattr(param, attr))
385
386
387# ----------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected