Repository navigation
Autogen: fix coverage landmines. #8174
Description
The unit_cov_level numbers in the various noxfile.py files are landmines (e.g., PR #8147 adds a # pragma: NO COVER and actually trips the check, because the total number of lines checked in BQDT drops!) The numbers don't represent any real goals (why 79% in one library or 95% in another?), but are merely "high water marks." The real goal is 100% coverage across all unit test runs, which we don't hit for many of the autogen-only libraries.
To address the first issue, I would argue that we should just drop the coverage checks inside the unit / default sessions.
To address the second issue, we need to apply a change like the one in #7413 which actually tests the "shim" modules for the autogen-only libraries (and excludes the namespace package files).
Both of these changes need to happen in the generator / templates (dropping the --cov-fail-under bit in the unit / default session, tweaking the .coveragerc, adding a testcase module for each generated shim module).
Activity
14 remaining items
tseaver commentedon May 28, 2019
@lukesneeringer asserts that the new
gapic-generator-pythonwill produce fully-tested code, including the shim modules.busunkim96 commentedon Nov 3, 2021
The generator produces tests which cover 100% of the autogen code. If coverage falls below 100% an issue should be opened: https://github.com/googleapis/gapic-generator-python/issues.