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

Method test_check_invalid

tests/test_validators.py:935–943  ·  view source on GitHub ↗

Raise ValueError if value {op} bound.

(self, v, value)

Source from the content-addressed store, hash-verified

933 ],
934 )
935 def test_check_invalid(self, v, value):
936 """Raise ValueError if value {op} bound."""
937
938 @attr.s
939 class Tester:
940 value = attr.ib(validator=v(self.BOUND))
941
942 with pytest.raises(ValueError):
943 Tester(value)
944
945 @pytest.mark.parametrize("v", [lt, le, ge, gt])
946 def test_repr(self, v):

Callers

nothing calls this directly

Calls 1

TesterClass · 0.70

Tested by

no test coverage detected