Commit 1436a23
authored
fix(gapic-generator): add pragma to
During another PR, a failure in the cover nox session pointed at a lack
of unit test coverage for this recent addition to the repo. As a
constant, there is little benefit to instituting a unit test here. Adds
`# pragma: NO COVER` to `constants.py` to resolve the 100% coverage
check failure.
In addition a `select` function was inadvertently left out of an `if`
code block to correctly respond when feature does NOT have
`auto_populated_fields` during a recent generator update (~ 20260512).
* This error only shows up as an issue when code is generated in
packages that do not have `auto_populated_fields` and have been
generated very recently. In this case, during updates to
`google-cloud-logging`, we ran into this issue.constants.py to resolve coverage failure and correct if block (#17268)1 parent 65da316 commit 1436a23Copy full SHA for 1436a23
2 files changed
+2-2Lines changed: 2 additions & 2 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/gapic-generator/gapic
- templates/tests/unit/gapic/%name_%version/%sub
- utils
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
107 | 107 | |
108 | 108 | |
109 | 109 | |
110 | | - |
| 110 | + |
111 | 111 | |
112 | 112 | |
113 | 113 | |
|
Collapse file
packages/gapic-generator/gapic/utils/constants.py
Copy file name to clipboardExpand all lines: packages/gapic-generator/gapic/utils/constants.py+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
| 16 | + |
0 commit comments