From 73573352fc4489ab3ded61f9a55965d9913de1f5 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:16:06 +0100 Subject: [PATCH] [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 --- 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 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)) + \ -- 2.47.3