summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tokenize.py
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2023-05-30 21:52:52 (GMT)
committerGitHub <noreply@github.com>2023-05-30 21:52:52 (GMT)
commit70f315c2d6de87b0514ce16cc00a91a5b60a6098 (patch)
tree0a3e2b256a513f7d0767ee835b1366b7513b7590 /Lib/test/test_tokenize.py
parent9216e69a87d16d871625721ed5a8aa302511f367 (diff)
downloadcpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.zip
cpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.tar.gz
cpython-70f315c2d6de87b0514ce16cc00a91a5b60a6098.tar.bz2
gh-105042: Disable unmatched parens syntax error in python tokenize (#105061)
Diffstat (limited to 'Lib/test/test_tokenize.py')
-rw-r--r--Lib/test/test_tokenize.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index 44e3e26..a9a2b76 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -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.