How to omit reporting files that have 100% coverage in Coverage.py
Question:
Is there a setting I can put in the .coveragerc
file under [report]
to omit files that have 100% test coverage in my report?
The closest thing I found was the exclude_lines
option, but this only works for a regex pattern inside the code of your project, not for the report itself.
Answers:
I don’t believe so. Try submitting a Feature Request or writing such a feature and submitting a Pull Request.
As of Coverage.py 4.3.2 is now a --skip-covered
flag that can be passed to the pytest coverage report
command.
Pytest can also be configured to skip files that have 100% coverage.
Is there a setting I can put in the .coveragerc
file under [report]
to omit files that have 100% test coverage in my report?
The closest thing I found was the exclude_lines
option, but this only works for a regex pattern inside the code of your project, not for the report itself.
I don’t believe so. Try submitting a Feature Request or writing such a feature and submitting a Pull Request.
As of Coverage.py 4.3.2 is now a --skip-covered
flag that can be passed to the pytest coverage report
command.
Pytest can also be configured to skip files that have 100% coverage.