$ ./python -m test --fail-env-changed test.test_multiprocessing_fork.test_processes -m test.test_multiprocessing_fork.test_processes.WithProcessesTestLock.test_repr_lock
Warning -- Dangling processes: {<Process name='P2' pid=3761884 parent=3761868 stopped exitcode=-SIGTERM>}
Result: ENV CHANGED
Running the whole file passes: the process is reaped before the environment is checked.
Bug report
test_repr_lockstarts the processP2, terminates it and never joins it, so it is still inmultiprocessing.active_children()when the test ends:The same for the
forkserverandspawnvariants.Running the whole file passes: the process is reaped before the environment is checked.
Linked PRs