]> granicus.if.org Git - python/commitdiff
Use hex() when outputting the various checksums so the test output is the
authorGuido van Rossum <guido@python.org>
Fri, 24 Apr 1998 18:31:28 +0000 (18:31 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 24 Apr 1998 18:31:28 +0000 (18:31 +0000)
same on 32 and 64 bit machines.

Lib/test/output/test_zlib
Lib/test/test_zlib.py

index 196122890d338c286f76cc33af56e782703a2440..6995c11457443e54ca2ec5c6b5e5f89081b594a7 100644 (file)
@@ -1,6 +1,6 @@
 test_zlib
--440295136 1136044692
-198574839 198574839
+0xe5c1a120 0x43b6aa94
+0xbd602f7 0xbd602f7
 expecting Bad compression level
 expecting Invalid initialization option
 expecting Invalid initialization option
index 72dbcfa20a16184c613a4b38ea2b74d3e075792c..047e9858842ff260b57da5bdcc776dc4f41db09a 100644 (file)
@@ -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: