Commit 68e8b595 authored by Damien George's avatar Damien George
Browse files

tests: Catch ValueError instead of any exception to properly test error.

parent 722d4842
......@@ -18,17 +18,17 @@ print(binascii.a2b_base64(b'MTIzNEFCQ0RhYmNk'))
try:
print(binascii.a2b_base64(b'abc'))
except:
print("caught")
except ValueError:
print("ValueError")
try:
print(binascii.a2b_base64(b'abcde='))
except:
print("caught")
except ValueError:
print("ValueError")
try:
print(binascii.a2b_base64(b'ab*d'))
except:
print("caught")
except ValueError:
print("ValueError")
try:
print(binascii.a2b_base64(b'ab=cdef='))
except:
print("caught")
except ValueError:
print("ValueError")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment