diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-11-04 17:23:06 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-11-04 17:23:06 (GMT) |
commit | 3d325191bf373a498acb694f33eb1565f9398740 (patch) | |
tree | 8ff37d15e25599cbd91bc87796ae922a8227f894 /Lib/test | |
parent | 8ba79306d102cbe969127ff6034defff9c8bb6ec (diff) | |
download | cpython-3d325191bf373a498acb694f33eb1565f9398740.zip cpython-3d325191bf373a498acb694f33eb1565f9398740.tar.gz cpython-3d325191bf373a498acb694f33eb1565f9398740.tar.bz2 |
Port code page codec to Unicode API.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_codeccallbacks.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py index caa1b96..d654a3f 100644 --- a/Lib/test/test_codeccallbacks.py +++ b/Lib/test/test_codeccallbacks.py @@ -577,22 +577,18 @@ class CodecCallbackTest(unittest.TestCase): UnicodeEncodeError("ascii", "\uffff", 0, 1, "ouch")), ("\\uffff", 1) ) - if SIZEOF_WCHAR_T == 2: - len_wide = 2 - else: - len_wide = 1 if SIZEOF_WCHAR_T > 0: self.assertEqual( codecs.backslashreplace_errors( UnicodeEncodeError("ascii", "\U00010000", - 0, len_wide, "ouch")), - ("\\U00010000", len_wide) + 0, 1, "ouch")), + ("\\U00010000", 1) ) self.assertEqual( codecs.backslashreplace_errors( UnicodeEncodeError("ascii", "\U0010ffff", - 0, len_wide, "ouch")), - ("\\U0010ffff", len_wide) + 0, 1, "ouch")), + ("\\U0010ffff", 1) ) # Lone surrogates (regardless of unicode width) self.assertEqual( |