mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
(Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal()
This commit is contained in:
parent
cfed46e00a
commit
b84d723509
2 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue