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

Method test_check_invalid

tests/test_validators.py:1079–1089  ·  view source on GitHub ↗

Raise ValueError if len(value) < min_len.

(self, value)

Source from the content-addressed store, hash-verified

1077 ],
1078 )
1079 def test_check_invalid(self, value):
1080 """
1081 Raise ValueError if len(value) < min_len.
1082 """
1083
1084 @attr.s
1085 class Tester:
1086 value = attr.ib(validator=min_len(self.MIN_LENGTH))
1087
1088 with pytest.raises(ValueError):
1089 Tester(value)
1090
1091 def test_repr(self):
1092 """

Callers

nothing calls this directly

Calls 1

TesterClass · 0.70

Tested by

no test coverage detected