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