gh-104825: Remove implicit newline in the line attribute in tokens emitted in the tokenize module (#104846)

This commit is contained in:
Pablo Galindo Salgado 2023-05-24 10:59:18 +01:00 committed by GitHub
parent c45701e9ef
commit c8cf9b42eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 8 deletions

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