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

Method test_readonly_attributes

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

Source from the content-addressed store, hash-verified

425
426 @pytest.mark.parametrize("attr", ["concurrency"])
427 def test_readonly_attributes(self, attr):
428 param = OptimizeOption()
429 import sys
430
431 if sys.version_info >= (3, 11):
432 match_pattern = r"(can't set attribute|has no setter|readonly attribute)"
433 else:
434 match_pattern = r"can't set attribute"
435 with pytest.raises(AttributeError, match=match_pattern):
436 setattr(param, attr, getattr(param, attr))
437
438
439# ----------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected