summaryrefslogtreecommitdiff
path: root/tests/test_html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-05-17 22:28:57 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-05-17 22:28:57 -0400
commit5291dd2839d5adfe64106501e7f9fe4984cf53ac (patch)
treeb68981225ab39f81859533f9525303053ebe84a4 /tests/test_html.py
parent9e764b195723b15f29ed8182d1c6e37ac4a52c58 (diff)
downloadpython-coveragepy-git-5291dd2839d5adfe64106501e7f9fe4984cf53ac.tar.gz
Files with incorrect encoding declarations are no longer ignored. #351
Diffstat (limited to 'tests/test_html.py')
-rw-r--r--tests/test_html.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/test_html.py b/tests/test_html.py
index 6f6f42e4..a5878448 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -6,7 +6,6 @@ import os.path
import re
import coverage
-from coverage import env
import coverage.html
from coverage.misc import CoverageException, NotPython, NoSource
@@ -297,9 +296,8 @@ class HtmlWithUnparsableFilesTest(HtmlTestHelpers, CoverageTest):
cov.html_report()
self.assert_exists("htmlcov/index.html")
- # TODO: enable this test, and then fix this:
- # https://bitbucket.org/ned/coveragepy/issue/351/files-with-incorrect-encoding-are-ignored
- def SKIP_THIS_decode_error(self):
+ def test_decode_error(self):
+ # https://bitbucket.org/ned/coveragepy/issue/351/files-with-incorrect-encoding-are-ignored
# imp.load_module won't load a file with an undecodable character
# in a comment, though Python will run them. So we'll change the
# file after running.
@@ -324,10 +322,7 @@ class HtmlWithUnparsableFilesTest(HtmlTestHelpers, CoverageTest):
cov.html_report()
html_report = self.get_html_report_content("sub/not_ascii.py")
- if env.PY2:
- expected = "# Isn&#39;t this great?&#65533;!"
- else:
- expected = "# Isn&#39;t this great?&#203;!"
+ expected = "# Isn&#39;t this great?&#65533;!"
self.assertIn(expected, html_report)
def test_formfeeds(self):