(self, pytester: Pytester)
| 56 | assert out.find("does_not_work") != -1 |
| 57 | |
| 58 | def test_raises_output(self, pytester: Pytester) -> None: |
| 59 | reprec = pytester.inline_runsource( |
| 60 | """ |
| 61 | import pytest |
| 62 | def test_raises_doesnt(): |
| 63 | pytest.raises(ValueError, int, "3") |
| 64 | """ |
| 65 | ) |
| 66 | passed, skipped, failed = reprec.listoutcomes() |
| 67 | assert len(failed) == 1 |
| 68 | out = failed[0].longrepr.reprcrash.message # type: ignore[union-attr] |
| 69 | assert "DID NOT RAISE" in out |
| 70 | |
| 71 | def test_syntax_error_module(self, pytester: Pytester) -> None: |
| 72 | reprec = pytester.inline_runsource("this is really not python") |
nothing calls this directly
no test coverage detected