diff options
author | Guido van Rossum <guido@python.org> | 2007-05-22 21:56:47 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-22 21:56:47 (GMT) |
commit | 4581ae5fa2450db3f00384e4b2e86654605100d4 (patch) | |
tree | 3029bdbbfd3495e4d832036cc17d7ab0bc2f1c02 /Lib/test/test_binascii.py | |
parent | 0e225aa09bb8059c333424d58beecd833b2d2b6c (diff) | |
download | cpython-4581ae5fa2450db3f00384e4b2e86654605100d4.zip cpython-4581ae5fa2450db3f00384e4b2e86654605100d4.tar.gz cpython-4581ae5fa2450db3f00384e4b2e86654605100d4.tar.bz2 |
Make test_base64 pass.
Change binascii.Error to derive from ValueError
and raise binascii.Error everywhere where values are bad
(why on earth did the old code use TypeError?!?).
Diffstat (limited to 'Lib/test/test_binascii.py')
-rwxr-xr-x | Lib/test/test_binascii.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index d1a4cfb..dc87e94 100755 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -118,8 +118,8 @@ class BinASCIITest(unittest.TestCase): t = binascii.b2a_hex(s) u = binascii.a2b_hex(t) self.assertEqual(s, u) - self.assertRaises(TypeError, binascii.a2b_hex, t[:-1]) - self.assertRaises(TypeError, binascii.a2b_hex, t[:-1] + b'q') + self.assertRaises(binascii.Error, binascii.a2b_hex, t[:-1]) + self.assertRaises(binascii.Error, binascii.a2b_hex, t[:-1] + b'q') # Verify the treatment of Unicode strings if test_support.have_unicode: |