]> granicus.if.org Git - python/commitdiff
Added test for new crc32() function.
authorGuido van Rossum <guido@python.org>
Wed, 16 Feb 2000 21:13:06 +0000 (21:13 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 16 Feb 2000 21:13:06 +0000 (21:13 +0000)
Lib/test/test_binascii.py

index 0ee842c4e9e3e233a7dda1a37f816fcda3dcbe6c..28908ef377582366ec7ed4729911039a8afa1dba 100755 (executable)
@@ -84,4 +84,10 @@ for line in lines:
     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