-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for omitting entire modules #221
Conversation
This commit will enable entire modules to be conditionally omitted from test coverage measurement. Modules will be omitted using the coverage.py `[run] omit` configuration setting. https://coverage.readthedocs.io/en/stable/config.html#run-omit https://coverage.readthedocs.io/en/stable/source.html
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.
Thank you! This seems very useful!
I have just one nit to apply :)
Thanks for the prompt review @sobolevn! I'm happy to consider the nit you suggested, but it makes type annotations more complicated, and the It looks like we need to update |
What's missing here? |
I can work on it and finish it tomorrow. |
I didn't mean to give you work, I really wanted to know what was missing hahaha ...but thanks. |
Codecov Report
@@ Coverage Diff @@
## master #221 +/- ##
===========================================
- Coverage 90.90% 78.94% -11.97%
===========================================
Files 1 4 +3
Lines 11 19 +8
===========================================
+ Hits 10 15 +5
- Misses 1 4 +3
|
Thank you! Great idea! |
Description
This PR will enable entire modules to be conditionally omitted from test coverage measurement (#2).
Changes
Modules will be omitted using the coverage.py
[run] omit
configuration setting.The syntax for omitting modules will be slightly different from the suggestion by @sobolevn (#2 (comment)) to align more closely with the file pattern syntax used by coverage.py.
Related
[run] omit