Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nedbat opened this issue May 31, 2010 · 1 comment
Closed

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

nedbat opened this issue May 31, 2010 · 1 comment
Labels
bug Something isn't working html

Comments

@nedbat
Copy link
Owner

nedbat commented May 31, 2010

Originally reported by Álvaro Justen - Turicas (Bitbucket: turicas, GitHub: turicas)


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:

#!/bin/bash

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.


@nedbat
Copy link
Owner Author

nedbat commented Jan 19, 2015

This is now fixed, as of 12c95635b95dead19949efd3aa7eba8064602ed6 (bb)

@nedbat nedbat closed this as completed Jan 19, 2015
@nedbat nedbat added major bug Something isn't working html labels Jun 23, 2018
agronholm added a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working html
Projects
None yet
Development

No branches or pull requests

1 participant