Raises `TypeError` on wrong types.
(self)
| 142 | v(None, simple_attr(class="st">"test"), True) |
| 143 | |
| 144 | def test_fail(self): |
| 145 | class="st">""" |
| 146 | Raises `TypeError` on wrong types. |
| 147 | class="st">""" |
| 148 | v = instance_of(int) |
| 149 | a = simple_attr(class="st">"test") |
| 150 | with pytest.raises(TypeError) as e: |
| 151 | v(None, a, class="st">"42") |
| 152 | assert ( |
| 153 | class="st">"&class="cm">#x27;test' must be <class 'int'> (got '42' that is a <class 'str'>).", |
| 154 | a, |
| 155 | int, |
| 156 | class="st">"42", |
| 157 | ) == e.value.args |
| 158 | |
| 159 | def test_repr(self): |
| 160 | class="st">""" |
nothing calls this directly
no test coverage detected