diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_zlib.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py index 88c415b..ecdb5a7 100644 --- a/Lib/test/test_zlib.py +++ b/Lib/test/test_zlib.py @@ -47,16 +47,11 @@ class ChecksumTestCase(unittest.TestCase): self.assertEqual(zlib.adler32(b"", 1), 1) self.assertEqual(zlib.adler32(b"", 432), 432) - def assertEqual32(self, seen, expected): - # 32-bit values masked -- checksums on 32- vs 64- bit machines - # This is important if bit 31 (0x08000000L) is set. - self.assertEqual(seen & 0x0FFFFFFFF, expected & 0x0FFFFFFFF) - def test_penguins(self): - self.assertEqual32(zlib.crc32(b"penguin", 0), 0x0e5c1a120) - self.assertEqual32(zlib.crc32(b"penguin", 1), 0x43b6aa94) - self.assertEqual32(zlib.adler32(b"penguin", 0), 0x0bcf02f6) - self.assertEqual32(zlib.adler32(b"penguin", 1), 0x0bd602f7) + self.assertEqual(zlib.crc32(b"penguin", 0), 0x0e5c1a120) + self.assertEqual(zlib.crc32(b"penguin", 1), 0x43b6aa94) + self.assertEqual(zlib.adler32(b"penguin", 0), 0x0bcf02f6) + self.assertEqual(zlib.adler32(b"penguin", 1), 0x0bd602f7) self.assertEqual(zlib.crc32(b"penguin"), zlib.crc32(b"penguin", 0)) self.assertEqual(zlib.adler32(b"penguin"),zlib.adler32(b"penguin",1)) |