summaryrefslogtreecommitdiff
path: root/tests/test_misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-12-06 22:38:17 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-12-06 22:38:17 -0500
commit636b34eaf660b761d166c9355dd3c2361fdb085c (patch)
treef2c02e1b262d2a506e1b09668bc469a6474fabe8 /tests/test_misc.py
parentc04ca08067e351a76c54973185ad4ca0cae8b1ae (diff)
downloadpython-coveragepy-git-636b34eaf660b761d166c9355dd3c2361fdb085c.tar.gz
Prevent UnicodeErrors in HTML reports with Unicode configuration values
Diffstat (limited to 'tests/test_misc.py')
-rw-r--r--tests/test_misc.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py
index 38be3456..96b5100b 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -34,6 +34,13 @@ class HasherTest(CoverageTest):
h2.update(b"Goodbye!")
self.assertNotEqual(h1.hexdigest(), h2.hexdigest())
+ def test_unicode_hashing(self):
+ h1 = Hasher()
+ h1.update(u"Hello, world! \N{SNOWMAN}")
+ h2 = Hasher()
+ h2.update(u"Goodbye!")
+ self.assertNotEqual(h1.hexdigest(), h2.hexdigest())
+
def test_dict_hashing(self):
h1 = Hasher()
h1.update({'a': 17, 'b': 23})