Issue #11277: oops, fix checksum values of test_zlib on 32 bits

This commit is contained in:
Victor Stinner 2011-05-04 21:40:36 +02:00
parent 7fd90c403d
commit 28a8e96378
1 changed files with 6 additions and 2 deletions

View File

@ -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):