summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zlib.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-04 19:40:36 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-04 19:40:36 (GMT)
commit28a8e9637888de3c254e624576d2ecc54a8f2ae6 (patch)
tree2ef17be547a725c355b5d806898a322618b21dd9 /Lib/test/test_zlib.py
parent7fd90c403d866945bed26cfe2feaf1bb5c095e66 (diff)
downloadcpython-28a8e9637888de3c254e624576d2ecc54a8f2ae6.zip
cpython-28a8e9637888de3c254e624576d2ecc54a8f2ae6.tar.gz
cpython-28a8e9637888de3c254e624576d2ecc54a8f2ae6.tar.bz2
Issue #11277: oops, fix checksum values of test_zlib on 32 bits
Diffstat (limited to 'Lib/test/test_zlib.py')
-rw-r--r--Lib/test/test_zlib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 26cf309..5dcb83f 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):