diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2011-11-04 18:23:06 +0100 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2011-11-04 18:23:06 +0100 |
| commit | 3d325191bf373a498acb694f33eb1565f9398740 (patch) | |
| tree | 8ff37d15e25599cbd91bc87796ae922a8227f894 /Lib/test/test_codeccallbacks.py | |
| parent | 8ba79306d102cbe969127ff6034defff9c8bb6ec (diff) | |
| download | cpython-git-3d325191bf373a498acb694f33eb1565f9398740.tar.gz | |
Port code page codec to Unicode API.
Diffstat (limited to 'Lib/test/test_codeccallbacks.py')
| -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 caa1b96e71..d654a3f8a0 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( |
