Re-enable faulthandler if pytest encountered it enabled during configure. We should be able to then see crashes during interpreter shutdown.
(pytester: Pytester)
| 31 | |
| 32 | |
| 33 | def test_crash_during_shutdown_captured(pytester: Pytester) -> None: |
| 34 | """ |
| 35 | Re-enable faulthandler if pytest encountered it enabled during configure. |
| 36 | We should be able to then see crashes during interpreter shutdown. |
| 37 | """ |
| 38 | setup_crashing_test(pytester) |
| 39 | args = (sys.executable, "-Xfaulthandler", "-mpytest") |
| 40 | result = pytester.run(*args) |
| 41 | result.stderr.fnmatch_lines(["*Fatal Python error*"]) |
| 42 | assert result.ret != 0 |
| 43 | |
| 44 | |
| 45 | def test_crash_during_shutdown_not_captured(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected