[3.12] gh-104825: add omitted idlelib text fix (#104880)

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)
This commit is contained in:
Terry Jan Reedy 2023-05-24 13:41:50 -04:00 committed by GitHub
parent 25890ebbb8
commit 2b54ea5ba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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):