Skip to content

Disallow impossible values for fail_under#746

Merged
nedbat merged 1 commit intocoveragepy:masterfrom
miketheman:miketheman/more_than_100
Dec 24, 2018
Merged

Disallow impossible values for fail_under#746
nedbat merged 1 commit intocoveragepy:masterfrom
miketheman:miketheman/more_than_100

Conversation

@miketheman
Copy link
Copy Markdown
Contributor

Since there's no way were likely to achieve greater than 100% code coverage,
disallow usage of any value above 100.

Resolves #743

Signed-off-by: Mike Fiedler miketheman@gmail.com

@miketheman
Copy link
Copy Markdown
Contributor Author

I tried to find a place to implement this other than a method that currently only returns a bool - but I didn't find anywhere that configs are validated, so I hope this is ok.

Very open to feedback here!

@nedbat
Copy link
Copy Markdown
Member

nedbat commented Dec 24, 2018

Thanks! I took a quick look earlier, and I think I would have put the check in the same place you did.

I wouldn't make the message so flip :) Feel free to add yourself to the CONTRIBUTORS file. :)

@miketheman miketheman force-pushed the miketheman/more_than_100 branch from 21c91a9 to bb58942 Compare December 24, 2018 02:00
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 24, 2018

Codecov Report

Merging #746 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #746      +/-   ##
==========================================
- Coverage   89.94%   89.92%   -0.02%     
==========================================
  Files          78       78              
  Lines       10799    10804       +5     
  Branches     1116     1117       +1     
==========================================
+ Hits         9713     9716       +3     
- Misses        959      960       +1     
- Partials      127      128       +1
Impacted Files Coverage Δ
tests/test_results.py 100% <100%> (ø) ⬆️
coverage/results.py 95.91% <100%> (+0.05%) ⬆️
tests/test_summary.py 97.01% <0%> (-0.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce9194a...09da2fc. Read the comment docs.

@miketheman
Copy link
Copy Markdown
Contributor Author

@nedbat I updated the error message to be a little less... opinionated. 😀

Codecov failure appears once I force-pushed the branch, it should probably re-report at some later time?

Since there's no way were likely to achieve greater than 100% code coverage,
disallow usage of any value above 100.

Resolves coveragepy#743

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman force-pushed the miketheman/more_than_100 branch from bb58942 to 09da2fc Compare December 24, 2018 02:37
@nedbat
Copy link
Copy Markdown
Member

nedbat commented Dec 24, 2018

Thanks!

@nedbat nedbat merged commit 9f29efd into coveragepy:master Dec 24, 2018
@miketheman miketheman deleted the miketheman/more_than_100 branch December 24, 2018 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants