From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:16:06 +0000 (+0100) Subject: [3.11] gh-74678: Increase base64 test coverage (GH-21913) (GH-113810) X-Git-Tag: v3.11.8~182 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73573352fc4489ab3ded61f9a55965d9913de1f5;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-74678: Increase base64 test coverage (GH-21913) (GH-113810) Ensure the character y is disallowed within an Ascii85 5-tuple. (cherry picked from commit 802d4954f12541ba28dd7f18bf4a65054941a80d) Co-authored-by: Zackery Spytz Co-authored-by: Lee Cannon --- diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 217f29454688..8582cdc40937 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -582,6 +582,7 @@ class BaseXYTestCase(unittest.TestCase): eq(base64.a85decode(b'y+', b"www.python.org") @@ -685,6 +686,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)) + \