Describe the bug
When using some external tool to manage concurrent execution of Python scripts, patch = subprocess
can miss some coverage.
To Reproduce
subprocess-parallel-make
make -j1
make -j10
Expected behavior
When make
is used to run multiple coverage jobs in parallel, all Python code executed is recorded by coverage.
Additional context
While trying to understand #2022 I noticed that this mode creates and then deletes the subcover.pth
file as the Python program was running. This made me wonder about the situation with sub-programs and sub-sub programs, and I created this demonstration with many parallel jobs and random delays to ensure the execution is staggered and takes a non-trivial amount of time.
I believe that what is happening is: python -mcoverage run
instance 1 terminates, removing the subcover.pth
file. python -mcoverage run
instance 2 is still running, and creates a new subprocess. but this subprocess doesn't bring in coverage because subcover.pth
has been removed.
This is not affecting me directly, it's just a problem I conjectured while learning the ins and outs of subprocess coverage.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4