summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-11-04 17:23:06 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-11-04 17:23:06 (GMT)
commit3d325191bf373a498acb694f33eb1565f9398740 (patch)
tree8ff37d15e25599cbd91bc87796ae922a8227f894 /Lib/test
parent8ba79306d102cbe969127ff6034defff9c8bb6ec (diff)
downloadcpython-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.py12
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(