mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-105042: Disable unmatched parens syntax error in python tokenize (#105061)
This commit is contained in:
parent
9216e69a87
commit
70f315c2d6
5 changed files with 49 additions and 34 deletions
|
@ -1119,6 +1119,13 @@ async def f():
|
|||
NEWLINE '\\n' (4, 1) (4, 2)
|
||||
""")
|
||||
|
||||
def test_closing_parenthesis_from_different_line(self):
|
||||
self.check_tokenize("); x", """\
|
||||
OP ')' (1, 0) (1, 1)
|
||||
OP ';' (1, 1) (1, 2)
|
||||
NAME 'x' (1, 3) (1, 4)
|
||||
""")
|
||||
|
||||
class GenerateTokensTest(TokenizeTest):
|
||||
def check_tokenize(self, s, expected):
|
||||
# Format the tokens in s in a table format.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue