Add missing lines to coverage report
Description of feature request
pytest-coverage
can output a column listing the specific lines which were not covered. We're currently (implicitly) using the default report, --cov-report term
, but we simply have to swap this for --cov-report term-missing
to add the extra info.
https://pytest-cov.readthedocs.io/en/latest/reporting.html
Use cases
This helps target testing efforts on lines that have not been covered.
Benefits
Better targeting of tests.
Drawbacks
The CI/CD job logs will be a bit wider. If this is a problem we could instead keep the current simplified terminal output, and add --cov-report xml
or --cov-report html
to add the more detailed info in a job artifact.
Suggested solutions
Add --cov-report term-missing
to pytest
's arguments in .gitlab-ci.yml
. I'll have a merge request momentarily.