diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2009-05-02 18:52:14 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2009-05-02 18:52:14 (GMT) |
commit | db12d454e6176e9c933babe3ce40b225307c6305 (patch) | |
tree | 28b09c64e9dfd797da58a98725bfb93b4dae7077 /Lib/test/test_unicodedata.py | |
parent | 02953d244fdb2fe99853d2fe5db905df53c6596f (diff) | |
download | cpython-db12d454e6176e9c933babe3ce40b225307c6305.zip cpython-db12d454e6176e9c933babe3ce40b225307c6305.tar.gz cpython-db12d454e6176e9c933babe3ce40b225307c6305.tar.bz2 |
Issue #3672: Reject surrogates in utf-8 codec; add surrogates error
handler.
Diffstat (limited to 'Lib/test/test_unicodedata.py')
-rw-r--r-- | Lib/test/test_unicodedata.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py index aed8eaa..b84aaaf 100644 --- a/Lib/test/test_unicodedata.py +++ b/Lib/test/test_unicodedata.py @@ -13,6 +13,7 @@ import subprocess import test.support encoding = 'utf-8' +errors = 'surrogates' ### Run tests @@ -61,7 +62,7 @@ class UnicodeMethodsTest(unittest.TestCase): (char + 'ABC').title(), ] - h.update(''.join(data).encode(encoding)) + h.update(''.join(data).encode(encoding, errors)) result = h.hexdigest() self.assertEqual(result, self.expectedchecksum) |