asyncio.ProcessPoolExecutor tracing not working correctly #481
first I had to monkey patch concurrent.futures.process._process_worker from concurrent.futures.ProcessPoolExecutor because it doesn't call the atexit handlers:
my first note is that this monkey patch would be a lot simpler if coverage.process_startup() returned the Coverage instance.
With the above patching, and running with "-p" for parallel, I actually get coverage data, however it's all bizarre. For example: in a function it will say the first line executed, but the next line did not, and the loop.run_until_complete line did not execute, but most of the lines in the coroutine did.
The text was updated successfully, but these errors were encountered:
ok I have a reproducible testcase!
now look at the results, note how nothing in get_executor_props is marked as run, further note that in executor_task, loop.run_until_complete is not marked as run, and yet the function that it runs is marked as run :) also "async def doit()" is not marked as run (would expect everything after init_coverage would be).
it seems like its only marking lines as hit in the async task, but not outside it. Perhaps there's some other initialization thats missing?