diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2005-11-22 15:39:05 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2005-11-22 15:39:05 (GMT) |
commit | 4e2a4ff6079db5e2115d8879fa511ecde161eae9 (patch) | |
tree | cf73e14f568de73d19e448c3773a93fd99df171a /Lib/test | |
parent | c6f6cb74af3b07adb4da2172b128da51afe00ebe (diff) | |
download | cpython-4e2a4ff6079db5e2115d8879fa511ecde161eae9.zip cpython-4e2a4ff6079db5e2115d8879fa511ecde161eae9.tar.gz cpython-4e2a4ff6079db5e2115d8879fa511ecde161eae9.tar.bz2 |
[Patch #1350573] zlib.crc32 doesn't handle 0xffffffff seed. Add tests and bugfix. Bug reported by John Schmidt; bugfix by Danny Yoo.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_zlib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index e91184e..7634680 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -24,6 +24,7 @@ class ChecksumTestCase(unittest.TestCase): # checksum test cases def test_crc32start(self): self.assertEqual(zlib.crc32(""), zlib.crc32("", 0)) + self.assert_(zlib.crc32("abc", 0xffffffff)) def test_crc32empty(self): self.assertEqual(zlib.crc32("", 0), 0) @@ -32,6 +33,7 @@ class ChecksumTestCase(unittest.TestCase): def test_adler32start(self): self.assertEqual(zlib.adler32(""), zlib.adler32("", 1)) + self.assert_(zlib.adler32("abc", 0xffffffff)) def test_adler32empty(self): self.assertEqual(zlib.adler32("", 0), 0) |