mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix use of assertRaises following c760bd844222 (spotted by Alex Gaynor).
This commit is contained in:
parent
c229e6e8ff
commit
dff46faa95
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue