diff options
author | Guido van Rossum <guido@python.org> | 2007-07-23 18:06:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-23 18:06:59 (GMT) |
commit | 005ebb1f7c40bdacd25fba8cae232ad2fb6c4c84 (patch) | |
tree | 38f58257bbb75ad8659eda99f833fbc0c89b3250 /Lib/test/test_multibytecodec_support.py | |
parent | 4ca947183154a7cfc7a6ccbb2e5c856a16a5dce3 (diff) | |
download | cpython-005ebb1f7c40bdacd25fba8cae232ad2fb6c4c84.zip cpython-005ebb1f7c40bdacd25fba8cae232ad2fb6c4c84.tar.gz cpython-005ebb1f7c40bdacd25fba8cae232ad2fb6c4c84.tar.bz2 |
Tweaks to make the codecmaps tests pass again.
(To run these, you need to pass -uurlfetch to regrtest.py or runtests.sh.)
Diffstat (limited to 'Lib/test/test_multibytecodec_support.py')
-rw-r--r-- | Lib/test/test_multibytecodec_support.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py index ad73bad..40a67ea 100644 --- a/Lib/test/test_multibytecodec_support.py +++ b/Lib/test/test_multibytecodec_support.py @@ -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 |