How to test an application with multiple processes, collecting coverage of them all, using Popen?
The pytest-cov documentation only covers the multiprocessing module, not subprocess. https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
My application uses Popen to start new copies of itself. All children are SIGTERMed (which is handled so that they exit normally) and then waited for by their parents. However, the coverage reports show some lines of execution in the first child until it calls Popen (shown in red), and some lines in grandchildren. I suspect that coverage report files may get overwritten by the multiple processes. No simple test case, sorry.