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

Method test_repr

tests/test_validators.py:1154–1164  ·  view source on GitHub ↗

Returned validator has a useful `__repr__`.

(self)

Source from the content-addressed store, hash-verified

1152 assert not_.__name__ in validator_module.__all__
1153
1154 def test_repr(self):
1155 """
1156 Returned validator has a useful `__repr__`.
1157 """
1158 wrapped = in_([3, 4, 5])
1159
1160 v = not_(wrapped)
1161
1162 assert (
1163 f"<not_ validator wrapping {wrapped!r}, capturing {v.exc_types!r}>"
1164 ) == repr(v)
1165
1166 def test_success_because_fails(self):
1167 """

Callers

nothing calls this directly

Calls 2

in_Function · 0.90
not_Function · 0.90

Tested by

no test coverage detected