MCPcopy
hub / github.com/python-attrs/attrs / test_check_valid

Method test_check_valid

tests/test_validators.py:989–999  ·  view source on GitHub ↗

Silent if len(value) <= max_len. Values can be strings and other iterables.

(self, value)

Source from the content-addressed store, hash-verified

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",

Callers

nothing calls this directly

Calls 1

TesterClass · 0.70

Tested by

no test coverage detected