Skip to content

Commit

Permalink
Add test with non-unicode text file
Browse files Browse the repository at this point in the history
  • Loading branch information
jaap3 committed Nov 4, 2021
1 parent 5d499a6 commit b98e5c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ def test_customized_extensions(self):
self.assert_analysis([1], name="phd.tex", missing=[1])
# The editor leave-behinds are not in the measured files.
self.assert_measured_files("main.html", "unused.html", "phd.tex")

def test_non_utf8(self):
# Template containing a word encoded in CP-1252
self.make_file(self._path("german.txt"), bytes=b"sh\xf6n")
self.run_django_coverage(name="german.txt")
self.assert_measured_files("german.txt")
self.assert_analysis([1], name="german.txt")

0 comments on commit b98e5c0

Please sign in to comment.