From cba04366a47d77f3a63b3704651817a561154c32 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 16 Feb 2000 21:13:06 +0000 Subject: [PATCH] Added test for new crc32() function. --- Lib/test/test_binascii.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index 0ee842c4e9e..28908ef3775 100755 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -84,4 +84,10 @@ def addnoise(line): res = res + b assert res == testdata +# Test crc32() +crc = binascii.crc32("Test the CRC-32 of") +crc = binascii.crc32(" this string.", crc) +if crc != 1571220330: + print "binascii.crc32() failed." + # The hqx test is in test_binhex.py