summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-18 21:31:05 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-18 21:31:05 -0500
commit9304efd307f88e358629059d939c214c1ec720fa (patch)
treee7efc55ec534085a254613b5660d74f396c13395
parent0618e029df90133aa836847a403f6584eeaf57a4 (diff)
downloadpython-coveragepy-git-9304efd307f88e358629059d939c214c1ec720fa.tar.gz
Issue #69 was fixed yesterday
-rw-r--r--CHANGES.txt3
-rw-r--r--tests/test_html.py13
2 files changed, 15 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index f41d2084..39650a1f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,7 +8,7 @@ Latest
- Reports now use file names with extensions. Previously, a report would
describe a/b/c.py as "a/b/c". Now it is shown as "a/b/c.py". This allows
- for better support of non-Python files.
+ for better support of non-Python files, and also fixed `issue 69`_.
- When looking for the source for a frame, check if the file exists. On
Windows, .pyw files are no longer recorded as .py files. Along the way, this
@@ -20,6 +20,7 @@ Latest
- Regexes in the configuration file are now compiled as soon as they are read,
to provide error messages earlier (`issue 349`_).
+.. _issue 69: https://bitbucket.org/ned/coveragepy/issue/69/coverage-html-overwrite-files-that-doesnt
.. _issue 290: https://bitbucket.org/ned/coveragepy/issue/290/running-programmatically-with-pyw-files
.. _issue 345: https://bitbucket.org/ned/coveragepy/issue/345/xml-reports-line-rate-0-for-empty-files
.. _issue 349: https://bitbucket.org/ned/coveragepy/issue/349/bad-regex-in-config-should-get-an-earlier
diff --git a/tests/test_html.py b/tests/test_html.py
index b4189af2..5b76e36b 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -11,6 +11,7 @@ from coverage.misc import CoverageException, NotPython, NoSource
from tests.coveragetest import CoverageTest
+
class HtmlTestHelpers(CoverageTest):
"""Methods that help with HTML tests."""
@@ -331,6 +332,18 @@ class HtmlTest(CoverageTest):
with self.assertRaisesRegex(NoSource, msg):
cov.html_report()
+ def test_extensionless_file_collides_with_extension(self):
+ # It used to be that "afile" and "afile.py" would both be reported to
+ # "afile.html". Now they are not.
+ # https://bitbucket.org/ned/coveragepy/issue/69
+ self.make_file("afile", "import afile\n")
+ self.make_file("afile.py", "a = 1\n")
+ self.run_command("coverage run afile")
+ self.run_command("coverage html")
+ self.assert_exists("htmlcov/index.html")
+ self.assert_exists("htmlcov/afile.html")
+ self.assert_exists("htmlcov/afile_py.html")
+
class HtmlStaticFileTest(CoverageTest):
"""Tests of the static file copying for the HTML report."""