From: Zackery Spytz Date: Mon, 8 Jan 2024 11:01:31 +0000 (-0800) Subject: gh-74678: Increase base64 test coverage (GH-21913) X-Git-Tag: v3.13.0a3~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=802d4954f12541ba28dd7f18bf4a65054941a80d;p=thirdparty%2FPython%2Fcpython.git gh-74678: Increase base64 test coverage (GH-21913) Ensure the character y is disallowed within an Ascii85 5-tuple. Co-authored-by: Lee Cannon --- diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index fa03fa1d61ce..f6171d3ed4ef 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)) + \