1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #69 resolved

coverage html overwrite files that doesn't have .py extension

Álvaro Justen - Turicas
created an issue

My project setupy (http://bitbucket.org/turicas/setupy) have three files that I need to test coverage:

  • test_setupy.py
  • setupy.py
  • setupy

The last one have execute permission and is a python script (have #!/usr/bin/env python on the first line) but when I run: {{{


covered_files="test_setupy.py setupy.py setupy"

rm -rf coverage_html coverage run $covered_files coverage report $covered_files coverage html -d coverage_html $covered_files }}}

coverage creates the directory coverage_html with some files. index.html is OK but there is only one setupy.html (it creates the setupy.py report and then overwrites it with setupy report).

Ok, this is an issue related to my project because I'm not using .py extension - but we have a lot of projects that doesn't use the .py extension (projects that are made in python and have the main file on /usr/bin, for example (mercurial, easy_install, ipython, update-manager (ubuntu), yum (centos) and a lot of others).

So I suggest to create the HTML file with: original_filename_with_extension.html. In my case above, we'll have setupy.py.html and setupy.html, for example.