summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multibytecodec.py
diff options
context:
space:
mode:
authorEzio Melotti <none@none>2011-10-04 16:06:00 (GMT)
committerEzio Melotti <none@none>2011-10-04 16:06:00 (GMT)
commita9860aeb08fce7494a963746c04102d23f1cf4ac (patch)
treebe8e64b6a66b80997969362be5795b75ac7b313a /Lib/test/test_multibytecodec.py
parentb7591d4780c76e17db4e143a097d128b124c2e66 (diff)
downloadcpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.zip
cpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.tar.gz
cpython-a9860aeb08fce7494a963746c04102d23f1cf4ac.tar.bz2
#13054: fix usage of sys.maxunicode after PEP-393.
Diffstat (limited to 'Lib/test/test_multibytecodec.py')
-rw-r--r--Lib/test/test_multibytecodec.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 4448072..feb7bd5 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -247,14 +247,9 @@ class Test_ISO2022(unittest.TestCase):
self.assertFalse(any(x > 0x80 for x in e))
def test_bug1572832(self):
- if sys.maxunicode >= 0x10000:
- myunichr = chr
- else:
- myunichr = lambda x: chr(0xD7C0+(x>>10)) + chr(0xDC00+(x&0x3FF))
-
for x in range(0x10000, 0x110000):
# Any ISO 2022 codec will cause the segfault
- myunichr(x).encode('iso_2022_jp', 'ignore')
+ chr(x).encode('iso_2022_jp', 'ignore')
class TestStateful(unittest.TestCase):
text = '\u4E16\u4E16'