From dedc5a60d1f270bc8e95202b487dfe77b80a9f5e Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 17 Aug 2020 18:19:09 -0600 Subject: [PATCH] bpo-30493: Increase base64 test coverage Ensure the character y is disallowed within a 5-tuple when foldspaces is True. Co-Authored-By: Lee Cannon --- Lib/test/test_base64.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 4f62c4115f60aa1..1c0f148e3e74645 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -582,6 +582,7 @@ def test_a85decode(self): eq(base64.a85decode(b'y+', b"www.python.org") @@ -685,6 +686,8 @@ def test_a85decode_errors(self): self.assertRaises(ValueError, base64.a85decode, b's8W', adobe=False) self.assertRaises(ValueError, base64.a85decode, b's8W-', adobe=False) self.assertRaises(ValueError, base64.a85decode, b's8W-"', adobe=False) + self.assertRaises(ValueError, base64.a85decode, b'aaaay', + foldspaces=True) def test_b85decode_errors(self): illegal = list(range(33)) + \