mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Tweaks to make the codecmaps tests pass again.
(To run these, you need to pass -uurlfetch to regrtest.py or runtests.sh.)
This commit is contained in:
parent
4ca9471831
commit
005ebb1f7c
4 changed files with 20 additions and 20 deletions
|
@ -284,15 +284,15 @@ class TestBase_Mapping(unittest.TestCase):
|
|||
|
||||
csetval = eval(data[0])
|
||||
if csetval <= 0x7F:
|
||||
csetch = chr(csetval & 0xff)
|
||||
csetch = bytes([csetval & 0xff])
|
||||
elif csetval >= 0x1000000:
|
||||
csetch = chr(csetval >> 24) + chr((csetval >> 16) & 0xff) + \
|
||||
chr((csetval >> 8) & 0xff) + chr(csetval & 0xff)
|
||||
csetch = bytes([(csetval >> 24), ((csetval >> 16) & 0xff),
|
||||
((csetval >> 8) & 0xff), (csetval & 0xff)])
|
||||
elif csetval >= 0x10000:
|
||||
csetch = chr(csetval >> 16) + \
|
||||
chr((csetval >> 8) & 0xff) + chr(csetval & 0xff)
|
||||
csetch = bytes([(csetval >> 16), ((csetval >> 8) & 0xff),
|
||||
(csetval & 0xff)])
|
||||
elif csetval >= 0x100:
|
||||
csetch = chr(csetval >> 8) + chr(csetval & 0xff)
|
||||
csetch = bytes([(csetval >> 8), (csetval & 0xff)])
|
||||
else:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue