(pytester: Pytester)
| 1159 | |
| 1160 | |
| 1161 | def test_exit_outcome(pytester: Pytester) -> None: |
| 1162 | pytester.makepyfile( |
| 1163 | test_foo=""" |
| 1164 | import pytest |
| 1165 | import unittest |
| 1166 | |
| 1167 | class MyTestCase(unittest.TestCase): |
| 1168 | def test_exit_outcome(self): |
| 1169 | pytest.exit("pytest_exit called") |
| 1170 | |
| 1171 | def test_should_not_run(self): |
| 1172 | pass |
| 1173 | """ |
| 1174 | ) |
| 1175 | result = pytester.runpytest() |
| 1176 | result.stdout.fnmatch_lines(["*Exit: pytest_exit called*", "*= no tests ran in *"]) |
| 1177 | |
| 1178 | |
| 1179 | def test_trace(pytester: Pytester, monkeypatch: MonkeyPatch) -> None: |
nothing calls this directly
no test coverage detected