(self, attr)
| 321 | |
| 322 | @pytest.mark.parametrize("attr", ["read_only", "enable_mmap"]) |
| 323 | def test_readonly_attributes(self, attr): |
| 324 | param = CollectionOption() |
| 325 | import sys |
| 326 | |
| 327 | if sys.version_info >= (3, 11): |
| 328 | match_pattern = r"(can't set attribute|has no setter|readonly attribute)" |
| 329 | else: |
| 330 | match_pattern = r"can't set attribute" |
| 331 | with pytest.raises(AttributeError, match=match_pattern): |
| 332 | setattr(param, attr, getattr(param, attr)) |
| 333 | |
| 334 | |
| 335 | # ---------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected