coveragepy
coveragepy copied to clipboard
Ability to report pragma no cover as being covered (codecov related)
As codecov.io does not have support for pragma no cover comments we need need to find a way to produce some coverage reports that report the "skipped" lines as being covered, so they will display accordingly in their web interface.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like Ideally we would have a configurable option as "no_pragma_as_covered: true" that changes the way the reports are created.
Currently we upload coverage.xml report to codecov.io
Describe alternatives you've considered I am not aware of any alternative to make the codecov coverage tracking in sync with coverage.py reporting.
Additional context
- https://community.codecov.com/t/pragma-no-cover-is-still-being-covered/1128
@ssbarnea Can you provide more detail about what isn't working with codecov.io?
Using # pragma: no cover seems to be working here:
https://app.codecov.io/gh/ansible/ansible/blob/devel/test%2Funits%2Fansible_test%2Ftest_diff.py#L8
Using # pragma: nocover seems to be working here:
https://app.codecov.io/gh/ansible/ansible/blob/devel/test%2Funits%2Fplaybook%2Frole%2Ftest_include_role.py#L202