]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-104825: add omitted idlelib text fix (#104880)
authorTerry Jan Reedy <tjreedy@udel.edu>
Wed, 24 May 2023 17:41:50 +0000 (13:41 -0400)
committerGitHub <noreply@github.com>
Wed, 24 May 2023 17:41:50 +0000 (17:41 +0000)
Order of events:
Terry merged new idlelib test into main.
Ms. I. made a 3.12 backport; tests passed.
Pablo merged the tokenize change with idlelib test fix into main.
Pablo merged a 3.12 backport without the idle test fix
as the backport of the latter had not yet been been merged.
Terry merged the idlelib test backport.  The new test failed
on at least 4 3.12 buildbots because of the tokenize change.
This PR backports the now needed idlelib test fix.

(cherry picked from commit c8cf9b4)

Lib/idlelib/idle_test/test_editor.py

index 9296a6d235fbbe3b61c96fe19c6cb91734949330..ba59c40dc6dde5012f873ee9af8f875959090e57 100644 (file)
@@ -201,8 +201,8 @@ class IndentSearcherTest(unittest.TestCase):
         test_info = (# text, (block, indent))
                      ("", (None, None)),
                      ("[1,", (None, None)),  # TokenError
-                     ("if 1:\n", ('if 1:\n', None)),
-                     ("if 1:\n  2\n  3\n", ('if 1:\n', '  2\n')),
+                     ("if 1:\n", ('if 1:', None)),
+                     ("if 1:\n  2\n  3\n", ('if 1:', '  2')),
                      )
         for code, expected_pair in test_info:
             with self.subTest(code=code):