Skip to content
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

skip_covered changes reported total percentage #423

Closed
nedbat opened this issue Oct 5, 2015 · 3 comments
Closed

skip_covered changes reported total percentage #423

nedbat opened this issue Oct 5, 2015 · 3 comments
Labels
bug Something isn't working report

Comments

@nedbat
Copy link
Owner

nedbat commented Oct 5, 2015

Originally reported by Charlie Denton (Bitbucket: meshy, GitHub: meshy)


A codebase I manage has noticed that since upgrading to 4.0.0 there is a drop in reported coverage (from 99% to 97%).

This value goes back to 99% when I remove the skip_covered setting from .coveragerc.

Unfortunately, I can't yet provide an example of this on an open source project.


@nedbat
Copy link
Owner Author

nedbat commented Oct 5, 2015

Original comment by Florian Bruhin (Bitbucket: The-Compiler, GitHub: The-Compiler)


There's some discussion about this in #43 - it seems this is intentional and the total only shows the visible rows.

@nedbat
Copy link
Owner Author

nedbat commented Oct 5, 2015

Pull request 43 (https://bitbucket.org/ned/coveragepy/pull-requests/43/add-skip-covered) has some discussion, but we were undecided, and expected feedback. Seems like we are getting feedback :)

Looking at it now, it does seem wrong that the total would exclude the skipped files. --fail-under is also affected, which seems wrong. The discussion in the pull request contrasts this feature with the HTML filtering, but HTML filtering is interactive and ad-hoc, for exploring the results. --skip-covered is a way to remove noise from the output.

@nedbat
Copy link
Owner Author

nedbat commented Oct 10, 2015

Fixed in 0d66850800e2 (bb).

@nedbat nedbat closed this as completed Oct 10, 2015
@nedbat nedbat added minor bug Something isn't working report labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working report
Projects
None yet
Development

No branches or pull requests

1 participant