Should html files be counted in coverage reports?
cclauss opened this issue · 0 comments
Please go over all the sections and search
https://pytest-cov.readthedocs.io/en/latest/ or
https://coverage.readthedocs.io/en/latest/
before opening the issue.
Summary
I use both pytest-django
and pytest-cov
to test my Django project. The coverage report is listing out all .html
files as having 0% test coverage. This substantially lowers the project's coverage. I expect coverage to list my Python files but not any of my HTML files.
- Are there ways to write pytests to cover Python code in HTML files?
- Is there a way to remove all
.html
files from my coverage report?
Expected vs actual result
Reproducer
Versions
Output of relevant packages pip list
, python --version
, pytest --version
etc.
Make sure you include complete output of tox
if you use it (it will show versions of various things).
Config
Include your tox.ini
, pytest.ini
, .coveragerc
, setup.cfg
or any relevant configuration.
Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
If you paste raw code make sure you quote it, eg:
def foobar():
pass
What has been tried to solve the problem
You should outline the things you tried to solve the problem but didn't work.