Malformed exception arguments
(self)
| 1350 | ) == e.value.args |
| 1351 | |
| 1352 | def test_bad_exception_args(self): |
| 1353 | """ |
| 1354 | Malformed exception arguments |
| 1355 | """ |
| 1356 | wrapped = in_("abc") |
| 1357 | |
| 1358 | with pytest.raises(TypeError) as e: |
| 1359 | not_(wrapped, exc_types=(str, int)) |
| 1360 | |
| 1361 | assert ( |
| 1362 | "'exc_types' must be a subclass of <class 'Exception'> " |
| 1363 | "(got <class 'str'>)." |
| 1364 | ) == e.value.args[0] |
| 1365 | |
| 1366 | |
| 1367 | class TestOr: |