You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception from the test run in a forked worker (wrongly) reports the mutant as killed #601
In my project, a pytest session sometimes raises at session finish (a race in pytest's temp dir cleanup), and mutmut (wrongly) reports those mutants as killed.
With the default process_isolation = "fork", ForkRunner.submit does not catch the exceptions from run_tests in the worker, so the worker unwinds through mutmut's main loop and exits 1, which reads as killed. The fork server catches the same exception and exits with -1, which status_by_exit_code reads (as 255) as timeout. I would expect a separate status, for example, suspicious, from both runners, because the tests did not actually finish cleanly.
I have just submitted a PR to pytest to that effect (pytest-dev/pytest#15174), but I think this should be fixed in mutmut nevertheless, even if the pytest PR removes the immediate cause of the flaky misattributions that I've been hitting.
At the moment, I'm running mutmut under my own wrapper to fix this, and two other issues that I have: #387 and #600 (cool number).
Shall I submit a PR for this one?
Reproducer
mutmut 3.8.0, mutmut run, then mutmut results --all true: calc.x_add__mutmut_1: killed. Without conftest.py: survived.
Activity