Skip to content

Commit b98e5c0

Browse files
author
Jaap Roes
committed
Add test with non-unicode text file
1 parent 5d499a6 commit b98e5c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_source.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,10 @@ def test_customized_extensions(self):
6464
self.assert_analysis([1], name="phd.tex", missing=[1])
6565
# The editor leave-behinds are not in the measured files.
6666
self.assert_measured_files("main.html", "unused.html", "phd.tex")
67+
68+
def test_non_utf8(self):
69+
# Template containing a word encoded in CP-1252
70+
self.make_file(self._path("german.txt"), bytes=b"sh\xf6n")
71+
self.run_django_coverage(name="german.txt")
72+
self.assert_measured_files("german.txt")
73+
self.assert_analysis([1], name="german.txt")

0 commit comments

Comments
 (0)