diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-06 22:38:17 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-06 22:38:17 -0500 |
| commit | 76e924a2b4268d9821c7fd6c69b6a092ddc936b1 (patch) | |
| tree | ee84892f0e3b8d4aa9291dedc21dd643e1d75a53 /tests/test_misc.py | |
| parent | 8db9fdf865ca0719cf2a37af25b93f53f39eb74c (diff) | |
| download | python-coveragepy-76e924a2b4268d9821c7fd6c69b6a092ddc936b1.tar.gz | |
Prevent UnicodeErrors in HTML reports with Unicode configuration values
Diffstat (limited to 'tests/test_misc.py')
| -rw-r--r-- | tests/test_misc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py index 38be345..96b5100 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}) |
