Test coverage is incorrectly configured for gapic-generator-python, and is trying to ananlyze non-python files as if they are python code
Test coverage is incorrectly configured, and is trying to ananlyze non-python files as if they are python code
Environment details
gapic-generatorversion:pip show gapic-generator- https://github.com/googleapis/gapic-generator-python/actions/runs/19183909674/job/54846602382?pr=2472
Steps to reproduce
- Creating PR in gapic-generator-python - https://github.com/googleapis/gapic-generator-python/actions/runs/19183909674/job/54846602382?pr=2472
The error log shows that the coverage tool is attempting to parse a Jinja2 template file (feature_fragments.j2), which is not a Python file, and this is causing a SyntaxError ( source). This happens because a unit test is rendering a template that imports feature_fragments.j2, and the coverage tool is trying to follow this import and analyze the template file for test coverage.
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
This is related to a recent release of coverage : https://pypi.org/project/coverage/7.11.1/. Let's exclude this version temporarily and see if it comes back. https://github.com/nedbat/coveragepy/issues/2077
Closing as obsolete. https://github.com/coveragepy/coveragepy/issues/2077 was fixed
Re-opening. This is still a problem. see build log https://github.com/googleapis/gapic-generator-python/actions/runs/19243623779/job/55012060872?pr=2482