gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

Test coverage is incorrectly configured for gapic-generator-python, and is trying to ananlyze non-python files as if they are python code

Open agrawalradhika-cell opened this issue 2 months ago • 3 comments

Test coverage is incorrectly configured, and is trying to ananlyze non-python files as if they are python code

Environment details

  • gapic-generator version: pip show gapic-generator - https://github.com/googleapis/gapic-generator-python/actions/runs/19183909674/job/54846602382?pr=2472

Steps to reproduce

  1. 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!

agrawalradhika-cell avatar Nov 07 '25 23:11 agrawalradhika-cell