diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-29 19:38:19 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-30 07:06:43 -0400 |
commit | 612d6600e5381527e028a8541c477ad6e8a3bb65 (patch) | |
tree | 7767802ad7639067bca63aada1e208631f8d077f /tests/test_html.py | |
parent | 8e66333ede129ab68b3f5a928899f7e87ceeec2d (diff) | |
download | python-coveragepy-git-612d6600e5381527e028a8541c477ad6e8a3bb65.tar.gz |
Make a Unicode character more apparent in the source
Diffstat (limited to 'tests/test_html.py')
-rw-r--r-- | tests/test_html.py | 8 |
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") |