-
Notifications
You must be signed in to change notification settings - Fork 123
Improve coverage checks #466
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #466 +/- ##
==========================================
- Coverage 91.48% 88.52% -2.97%
==========================================
Files 40 40
Lines 5240 5201 -39
Branches 0 863 +863
==========================================
- Hits 4794 4604 -190
+ Misses 446 418 -28
- Partials 0 179 +179
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me aside from using TestCases.get_path
in some places.
I'm not sure what is going on with the Codecov.io reports. When I get the coverage report locally I get 93.17% coverage, but the report that's getting posted here shows 88.52% for this PR. I'll look into that separately and see if I can figure out the cause.
Based on <https://stackoverflow.com/a/13477954/96588>. Also add tests to verify the exception being thrown.
By using the current file rather than the root of the project as the reference, the tests are now runnable for example in an IDE which uses the "tests" directory as the root.
It's already configured in .coveragerc.
Missing coverage in tests means unreached (and usually unreachable) test code, often indicating a test bug.
Stricter than statement coverage.
3cada57
to
f5d9ce7
Compare
@l0b0 In #452 I created a separate I think the quick fix is to update the |
f"SAR extension does not apply to type {type(obj)}" | ||
f"SAR extension does not apply to type '{type(obj).__name__}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this change could be made for a number of other extensions as well. Is there a reason to only change this for the sar
and view
extensions, or should we update the ext
method for all extensions in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that, but I'd need to be sure that you're OK with changing all of them so it's not wasted effort. What do you think?
I could also pull these changes into a separate PR if that helps.
Closing in favour of smaller PRs. |
Related Issue(s): #331
Description: Add tests, exclude some lines from coverage count, include tests in coverage count (highlighting unreached test code), and do some minor code changes to make it more testable.
The first PR already contains a bunch of orthogonal improvements. Let me know if you want to split it up into simpler pieces.
PR Checklist:
pre-commit run --all-files
)scripts/test
)