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 | d230c5a6e232483575069c91bf03ef32d8ff72de (patch) | |
tree | 8d9fb3bca4be51109b5fb371c81099a994285163 /Lib/test/test_codeccallbacks.py | |
parent | 762eb600184fb9894e88be2d36aaeecc8d8d5c6e (diff) | |
download | cpython-d230c5a6e232483575069c91bf03ef32d8ff72de.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( |