mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-104972: Ensure that line attributes in tokens in the tokenize module are correct (#104975)
This commit is contained in:
parent
2cb445635e
commit
3fdb55c482
4 changed files with 21 additions and 9 deletions
|
@ -201,8 +201,8 @@ class IndentSearcherTest(unittest.TestCase):
|
|||
test_info = (# text, (block, indent))
|
||||
("", (None, None)),
|
||||
("[1,", (None, None)), # TokenError
|
||||
("if 1:\n", ('if 1:', None)),
|
||||
("if 1:\n 2\n 3\n", ('if 1:', ' 2')),
|
||||
("if 1:\n", ('if 1:\n', None)),
|
||||
("if 1:\n 2\n 3\n", ('if 1:\n', ' 2\n')),
|
||||
)
|
||||
for code, expected_pair in test_info:
|
||||
with self.subTest(code=code):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue