summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-24 18:31:28 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-24 18:31:28 (GMT)
commit446898ff4aebc5ed8f641d8eb4ee2c31b3f3be3c (patch)
treef3ea4591b50bf8788b17c2cc52d1ac1b498abf00 /Lib/test/test_zlib.py
parenta937d14898e8e396a1c9acc0fbd2db5209d1a6ce (diff)
downloadcpython-446898ff4aebc5ed8f641d8eb4ee2c31b3f3be3c.zip
cpython-446898ff4aebc5ed8f641d8eb4ee2c31b3f3be3c.tar.gz
cpython-446898ff4aebc5ed8f641d8eb4ee2c31b3f3be3c.tar.bz2
Use hex() when outputting the various checksums so the test output is the
same on 32 and 64 bit machines.
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 72dbcfa..047e985 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -11,9 +11,9 @@ except ImportError:
buf = file.read() * 8
file.close()
-# test the chucksums
-print zlib.crc32('penguin'), zlib.crc32('penguin', 1)
-print zlib.adler32('penguin'), zlib.adler32('penguin', 1)
+# test the chucksums (hex so the test doesn't break on 64-bit machines)
+print hex(zlib.crc32('penguin')), hex(zlib.crc32('penguin', 1))
+print hex(zlib.adler32('penguin')), hex(zlib.adler32('penguin', 1))
# make sure we generate some expected errors
try: