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