diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-20 18:46:26 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-20 18:46:26 (GMT) |
commit | dff46faa955157d19ed70e10d1ce1cbfd660c14f (patch) | |
tree | 9f5c5dd1a9d9d0a75263a60f3983c5788828c6b7 | |
parent | c229e6e8ff6de61581f59266dc553f04f2c870c3 (diff) | |
download | cpython-dff46faa955157d19ed70e10d1ce1cbfd660c14f.zip cpython-dff46faa955157d19ed70e10d1ce1cbfd660c14f.tar.gz cpython-dff46faa955157d19ed70e10d1ce1cbfd660c14f.tar.bz2 |
Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
-rw-r--r-- | Lib/test/test_base64.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 5744af4..b02f86d 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -166,6 +166,7 @@ class BaseXYTestCase(unittest.TestCase): self.assertEqual(base64.b64decode(bstr.decode('ascii')), res) with self.assertRaises(binascii.Error): base64.b64decode(bstr, validate=True) + with self.assertRaises(binascii.Error): base64.b64decode(bstr.decode('ascii'), validate=True) def test_b32encode(self): @@ -236,6 +237,7 @@ class BaseXYTestCase(unittest.TestCase): for data in [b'abc', b'ABCDEF==']: with self.assertRaises(binascii.Error): base64.b32decode(data) + with self.assertRaises(binascii.Error): base64.b32decode(data.decode('ascii')) def test_b16encode(self): |