Raise ValueError if len(value) > max_len.
(self, value)
| 1006 | ], |
| 1007 | ) |
| 1008 | def test_check_invalid(self, value): |
| 1009 | """ |
| 1010 | Raise ValueError if len(value) > max_len. |
| 1011 | """ |
| 1012 | |
| 1013 | @attr.s |
| 1014 | class Tester: |
| 1015 | value = attr.ib(validator=max_len(self.MAX_LENGTH)) |
| 1016 | |
| 1017 | with pytest.raises(ValueError): |
| 1018 | Tester(value) |
| 1019 | |
| 1020 | def test_repr(self): |
| 1021 | """ |