-
Notifications
You must be signed in to change notification settings - Fork 36
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
Coverage reported for files not under test #32
Comments
I don't think you can avoid the allow list. Especially because it also tells |
The issue with tox was fixed in 7fe4ab8.
I'm pretty sure when I run coverage not using pytest-coverage, the additional files don't appear. It really shouldn't be necessary to exclude files in temporary directories from coverage... or to provide project-specific settings for a default configuration. |
I think starting with coveragepy 5.3, the new |
From the docs:
This setting doesn't solve the problem, as it still requires every project to configure another setting. An allow list should not be necessary. |
In #60, some common noise was removed, but some projects still get noise from other temporary files (pip-run, other pip temp dirs). |
Maybe ask @nedbat for advice? |
Don't want to bother Ned, because the issue is unique to pytest-cov. |
This issue was addressed in #56. |
Occasionally, but definitely not always, when pytest runs with pytest-cov as configured by this skeleton, the coverage report will include files not under test, including files under tox (despite the exclusion) and temp files created when running the tests. Consider this particularly egregious example from setuptools:
I'd like to find a solution that avoids requiring each project to create an allow-list of files to be included in coverage. It should be possible to discover the files for coverage just as it's possible to discover the files to test and exclude the rest.
The text was updated successfully, but these errors were encountered: