[Python-checkins] cpython: Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
antoine.pitrou
python-checkins at python.org
Mon Feb 20 19:49:52 CET 2012
http://hg.python.org/cpython/rev/2e54fd523412
changeset: 75060:2e54fd523412
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Feb 20 19:46:26 2012 +0100
summary:
Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
files:
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
--- a/Lib/test/test_base64.py
+++ b/Lib/test/test_base64.py
@@ -166,6 +166,7 @@
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 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list