gh-106368: Improve coverage reports for argument clinic by AlexWaygood · Pull Request #107693 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Conversation
- Use
...rather thanpassfor empty bodies in abstract methods that are never meant to be executed. Exclude lines consisting solely of...in our.coveragercfile. - Use
raise AssertionErrorinstead ofraise RuntimeErrorfor an exception that's never meant to be executed -- it would indicate a bug inTools/clinic/itself, rather than an incorrect usage of argument clinic, if that line was ever executed. Excluderaise AssertionError(lines in our.coveragercfile. - A reasonably large block of code in
Tools/clinic/cpp.pywas being excluded from coverage reports because it was all inside anif __name__ == "__main__"block, andif __name__ == "__main__"blocks are excluded in our.coveragercfile. That was making our coverage forcpp.pylook better than it actually was. Move that block inside a_main()function so that it's correctly reported as being uncovered in coverage reports.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters