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