summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_html.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_html.py b/tests/test_html.py
index de3f0d7d..36756319 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -1010,13 +1010,17 @@ assert len(math) == 18
doesnt_contain("out/tabbed_py.html", "\t")
def test_unicode(self):
+ surrogate = u"\U000e0100"
+ if env.PY2:
+ surrogate = surrogate.encode('utf-8')
+
self.make_file("unicode.py", """\
# -*- coding: utf-8 -*-
# A Python source file with exotic characters.
upside_down = "ʎd˙ǝbɐɹǝʌoɔ"
- surrogate = "db40,dd00: x󠄀"
- """)
+ surrogate = "db40,dd00: x@"
+ """.replace("@", surrogate))
cov = coverage.Coverage()
unimod = self.start_import_stop(cov, "unicode")