summaryrefslogtreecommitdiff
path: root/tests/test_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_html.py')
-rw-r--r--tests/test_html.py13
1 files changed, 13 insertions, 0 deletions
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."""