From 802d4954f12541ba28dd7f18bf4a65054941a80d Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 8 Jan 2024 03:01:31 -0800 Subject: [PATCH] gh-74678: Increase base64 test coverage (GH-21913) Ensure the character y is disallowed within an Ascii85 5-tuple. 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 fa03fa1d61c..f6171d3ed4e 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -586,6 +586,7 @@ class BaseXYTestCase(unittest.TestCase): eq(base64.a85decode(b'y+', b"www.python.org") @@ -689,6 +690,8 @@ class BaseXYTestCase(unittest.TestCase): 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)) + \