chore(ndb): restore fail_under=100 in .coveragerc and noxfile#17771
Conversation
There was a problem hiding this comment.
Code Review
This pull request increases the coverage requirement to 100% for google-cloud-ndb, updates the excluded lines and omitted paths in .coveragerc, and adds the --fail-under=100 flag to the nox coverage report. Feedback highlights that globally excluding 'raise TypeError' from coverage is risky as it may mask untested validation paths, and recommends using individual pragmas instead. Additionally, specifying --fail-under=100 in noxfile.py is redundant since it is already defined in .coveragerc.
| # Ignore defensive assertions | ||
| raise TypeError |
There was a problem hiding this comment.
Globally excluding raise TypeError from coverage reporting is risky. TypeError is commonly raised during input validation, which is a critical part of the public API contract and should be thoroughly unit-tested. Excluding it globally can mask untested validation paths, defeating the purpose of a 100% coverage requirement. If there are specific, untestable defensive type checks, it is safer to exclude them individually using # pragma: no cover rather than ignoring all TypeError exceptions globally.
…nder=100 in .coveragerc and noxfile
Restore coverage for google-cloud-ndb Towards #17459 🦕
Restore coverage for google-cloud-ndb
Towards #17459 🦕