[Python-checkins] cpython (2.7): Issue #11277: oops, fix checksum values of test_zlib on 32 bits

victor.stinner python-checkins at python.org
Wed May 4 21:41:21 CEST 2011


http://hg.python.org/cpython/rev/e6a4deb84e47
changeset:   69835:e6a4deb84e47
branch:      2.7
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Wed May 04 21:40:36 2011 +0200
summary:
  Issue #11277: oops, fix checksum values of test_zlib on 32 bits

files:
  Lib/test/test_zlib.py |  8 ++++++--
  1 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -99,8 +99,12 @@
                 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):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list