mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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
This commit is contained in:
parent
d5e2b6f3bc
commit
453e08c3bf
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue