1 From ed1aa2f4738efe948242f252bcb0aa0b4314d2a2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
3 Date: Fri, 5 Mar 2021 10:34:50 +0100
4 Subject: py2-ize the CJK codec test
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Michał Górny <mgorny@gentoo.org>
11 Lib/test/multibytecodec_support.py | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
14 diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py
15 index b7d7a3aba7..661ef9ee37 100644
16 --- a/Lib/test/multibytecodec_support.py
17 +++ b/Lib/test/multibytecodec_support.py
19 # Common Unittest Routines for CJK codecs
26 @@ -280,7 +281,7 @@ class TestBase_Mapping(unittest.TestCase):
28 def _test_mapping_file_plain(self):
30 - return ''.join(chr(int(x, 16)) for x in s.split('+'))
31 + return ''.join(unichr(int(x, 16)) for x in s.split('+'))
35 @@ -294,7 +295,7 @@ class TestBase_Mapping(unittest.TestCase):
37 if data[0][:2] != '0x':
38 self.fail("Invalid line: {line!r}".format(line=line))
39 - csetch = bytes.fromhex(data[0][2:])
40 + csetch = binascii.a2b_hex(data[0][2:])
41 if len(csetch) == 1 and 0x80 <= csetch[0]: