summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_binascii.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-16 21:13:06 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-16 21:13:06 (GMT)
commitcba04366a47d77f3a63b3704651817a561154c32 (patch)
treea4aab72d419c254022a479e37c2ba7facd695d9f /Lib/test/test_binascii.py
parent7d47c9e38ad53f9fec49b34cbe7012d6f4a926a4 (diff)
downloadcpython-cba04366a47d77f3a63b3704651817a561154c32.zip
cpython-cba04366a47d77f3a63b3704651817a561154c32.tar.gz
cpython-cba04366a47d77f3a63b3704651817a561154c32.tar.bz2
Added test for new crc32() function.
Diffstat (limited to 'Lib/test/test_binascii.py')
-rwxr-xr-xLib/test/test_binascii.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py
index 0ee842c..28908ef 100755
--- a/Lib/test/test_binascii.py
+++ b/Lib/test/test_binascii.py
@@ -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