mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #28992: Use bytes.fromhex().
This commit is contained in:
parent
47bdc40352
commit
8cbd3df3ce
4 changed files with 7 additions and 10 deletions
|
@ -338,7 +338,7 @@ class TestBase_Mapping(unittest.TestCase):
|
|||
uc = re.findall('<a u="([A-F0-9]{4})" b="([0-9A-F ]+)"/>', ucmdata)
|
||||
for uni, coded in uc:
|
||||
unich = chr(int(uni, 16))
|
||||
codech = bytes(int(c, 16) for c in coded.split())
|
||||
codech = bytes.fromhex(coded)
|
||||
self._testpoint(codech, unich)
|
||||
|
||||
def test_mapping_supplemental(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue