diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-22 00:50:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-22 00:50:07 (GMT) |
commit | b84d723509d1b8c7e052f61117624627d334cf30 (patch) | |
tree | 24ba2b8446ce3829d9658250da1c4f86dd63c398 /Lib/test | |
parent | cfed46e00a00380f05917c533a259fe45697a5ec (diff) | |
download | cpython-b84d723509d1b8c7e052f61117624627d334cf30.zip cpython-b84d723509d1b8c7e052f61117624627d334cf30.tar.gz cpython-b84d723509d1b8c7e052f61117624627d334cf30.tar.bz2 |
(Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_unicode.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index c63364a..b20f878 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1824,6 +1824,12 @@ class UnicodeTest(string_tests.CommonTest, b'123€') self.assertEqual(unicode_encodedecimal("123\u20ac", "backslashreplace"), b'123\\u20ac') + self.assertEqual(unicode_encodedecimal("123\u20ac\N{EM SPACE}", "replace"), + b'123? ') + self.assertEqual(unicode_encodedecimal("123\u20ac\u20ac", "replace"), + b'123??') + self.assertEqual(unicode_encodedecimal("123\u20ac\u0660", "replace"), + b'123?0') def test_transform_decimal(self): from _testcapi import unicode_transformdecimaltoascii as transform_decimal |