pytest-dev / pytest-cov

Coverage plugin for pytest.
MIT License
1.72k stars 211 forks source link

Should html files be counted in coverage reports? #571

Open cclauss opened 1 year ago

cclauss commented 1 year ago

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.

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.