summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-03-19 22:42:51 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-03-19 22:42:51 (GMT)
commit453e08c3bfa334bd8e12f521e4f768abdd9997a4 (patch)
tree76e8f817485290f6cfcd4d0740c7848b242ec579 /Lib
parentd5e2b6f3bcef9fea744bef331ad7278052223f11 (diff)
downloadcpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.zip
cpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.tar.gz
cpython-453e08c3bfa334bd8e12f521e4f768abdd9997a4.tar.bz2
Create a signed CRC32 hash. I'm not absolutely sure it's correct. At least it fixes the unit tests and doesn't create a different hash than Python 2.x
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_zlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index d2fd504..9cd5434 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -42,7 +42,7 @@ class ChecksumTestCase(unittest.TestCase):
def test_crc32_adler32_unsigned(self):
foo = 'abcdefghijklmnop'
# explicitly test signed behavior
- self.assertEqual(zlib.crc32(foo), 2486878355)
+ self.assertEqual(zlib.crc32(foo), -1808088941)
self.assertEqual(zlib.crc32('spam'), 1138425661)
self.assertEqual(zlib.adler32(foo+foo), 3573550353)
self.assertEqual(zlib.adler32('spam'), 72286642)