-
Notifications
You must be signed in to change notification settings - Fork 214
ProcessPoolExecutor code does not get reported #578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I did an additional test without the context being set to |
I'll also add that I did review this issue but the suggested fix didn't work for me: #165 |
Yes but that is irrelevant now since multiprocessing support was removed in pytest-cov 4.0. You can try adding this in your coveragerc for the support bultin support from coverage:
|
Thanks @ionelmc ! Those changes worked for me. I struggled to find these details though. I mostly reviewed the documentation on this page: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html. I would be happy to make a PR to add the above details. |
Summary
Hello. I am making use of a
ProcessPoolExecutor
context manager and all code that runs within it is not deemed as covered. I am running this on macOS.I execute this in tox normally, but this has the same issue outside of tox as well.
The command I run is:
pytest --cov --cov-report term-missing tests -n auto
. The behavior is the same with or without-n auto
forpytest-xdist
.Expected vs actual result
Expected to have the code covered. The actual result is that the code it not seen as covered.
Reproducer
Here is essentially the code that I have:
main.py:
test_main.py:
Run
pytest --cov --cov-report term-missing -n auto
for my tests.This is the output:
Per the output, lines 18-20 are missing, but they are in fact executed.
Versions
I should hopefully have the code OSS'd soon so that could provide more context, but in the meantime, the code above demonstrates the issue.
The text was updated successfully, but these errors were encountered: