Raises `TypeError` on wrong types.
(self)
| 1116 | v(None, simple_attr("test"), bool) |
| 1117 | |
| 1118 | def test_fail(self): |
| 1119 | """ |
| 1120 | Raises `TypeError` on wrong types. |
| 1121 | """ |
| 1122 | v = _subclass_of(int) |
| 1123 | a = simple_attr("test") |
| 1124 | with pytest.raises(TypeError) as e: |
| 1125 | v(None, a, str) |
| 1126 | assert ( |
| 1127 | "'test' must be a subclass of <class 'int'> (got <class 'str'>).", |
| 1128 | a, |
| 1129 | int, |
| 1130 | str, |
| 1131 | ) == e.value.args |
| 1132 | |
| 1133 | def test_repr(self): |
| 1134 | """ |
nothing calls this directly
no test coverage detected