(self)
| 26 | assert "invalid literal" in str(excinfo.value) |
| 27 | |
| 28 | def test_raises_function(self): |
| 29 | with pytest.raises(ValueError) as excinfo: |
| 30 | int("hello") |
| 31 | assert "invalid literal" in str(excinfo.value) |
| 32 | |
| 33 | def test_raises_does_not_allow_none(self): |
| 34 | with pytest.raises( |