From 28a8e9637888de3c254e624576d2ecc54a8f2ae6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 4 May 2011 21:40:36 +0200 Subject: [PATCH] Issue #11277: oops, fix checksum values of test_zlib on 32 bits --- Lib/test/test_zlib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index 26cf3093301..5dcb83f3f17 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -99,8 +99,12 @@ class ChecksumBigBufferTestCase(unittest.TestCase): f.flush() m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) try: - self.assertEqual(zlib.crc32(m), 0x709418e7) - self.assertEqual(zlib.adler32(m), -2072837729) + if sys.maxsize > _4G: + self.assertEqual(zlib.crc32(m), 0x709418e7) + self.assertEqual(zlib.adler32(m), -2072837729) + else: + self.assertEqual(zlib.crc32(m), 722071057) + self.assertEqual(zlib.adler32(m), -1002962529) finally: m.close() except (IOError, OverflowError):