FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-106368: Improve coverage reports for argument clinic by AlexWaygood · Pull Request #107693 · python/cpython · GitHub

/ cpython Public

gh-106368: Improve coverage reports for argument clinic - #107693

Merged
AlexWaygood merged 1 commit into
python:mainfrom
AlexWaygood:clinic-coverage
Aug 6, 2023
Merged

gh-106368: Improve coverage reports for argument clinic#107693
AlexWaygood merged 1 commit into
python:mainfrom
AlexWaygood:clinic-coverage

Conversation

AlexWaygood commented Aug 6, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member
  • Use ... rather than pass for empty bodies in abstract methods that are never meant to be executed. Exclude lines consisting solely of ... in our .coveragerc file.
  • Use raise AssertionError instead of raise RuntimeError for an exception that's never meant to be executed -- it would indicate a bug in Tools/clinic/ itself, rather than an incorrect usage of argument clinic, if that line was ever executed. Exclude raise AssertionError( lines in our .coveragerc file.
  • A reasonably large block of code in Tools/clinic/cpp.py was being excluded from coverage reports because it was all inside an if __name__ == "__main__" block, and if __name__ == "__main__" blocks are excluded in our .coveragerc file. That was making our coverage for cpp.py look better than it actually was. Move that block inside a _main() function so that it's correctly reported as being uncovered in coverage reports.

Comment thread Tools/clinic/clinic.py

erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

AlexWaygood merged commit ee3bf45 into python:main Aug 6, 2023
AlexWaygood deleted the clinic-coverage branch August 6, 2023 19:40
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL