(self)
| 42 | # it's unclear if this message is helpful, and if it is, should it trigger more |
| 43 | # liberally? Usually you'd get a TypeError here |
| 44 | def test_raises_false_and_arg(self): |
| 45 | with pytest.raises( |
| 46 | ValueError, |
| 47 | match=wrap_escape( |
| 48 | "Expected an exception type or a tuple of exception types, but got `False`. " |
| 49 | "Raising exceptions is already understood as failing the test, so you don't need " |
| 50 | "any special code to say 'this should never raise an exception'." |
| 51 | ), |
| 52 | ): |
| 53 | pytest.raises(False, int) # type: ignore[call-overload] |
| 54 | |
| 55 | def test_raises_does_not_allow_empty_tuple(self): |
| 56 | with pytest.raises( |
nothing calls this directly
no test coverage detected