Silent if len(value) <= max_len. Values can be strings and other iterables.
(self, value)
| 987 | ], |
| 988 | ) |
| 989 | def test_check_valid(self, value): |
| 990 | """ |
| 991 | Silent if len(value) <= max_len. |
| 992 | Values can be strings and other iterables. |
| 993 | """ |
| 994 | |
| 995 | @attr.s |
| 996 | class Tester: |
| 997 | value = attr.ib(validator=max_len(self.MAX_LENGTH)) |
| 998 | |
| 999 | Tester(value) # shouldn't raise exceptions |
| 1000 | |
| 1001 | @pytest.mark.parametrize( |
| 1002 | "value", |