aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-01-04 10:41:22 +0000
committerGitHub <noreply@github.com>2022-01-04 10:41:22 +0000
commit70f415fb8b632247e28d87998642317ca7a652ae (patch)
tree5e22e01157df0af81065d577f6609c948646ad93 /Lib/test/test_syntax.py
parenta94461d7189d7f1147ab304a332c8684263dc17e (diff)
downloadcpython-70f415fb8b632247e28d87998642317ca7a652ae.tar.gz
cpython-70f415fb8b632247e28d87998642317ca7a652ae.zip
bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378)
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index c95bc15e727..968d34809ce 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1663,6 +1663,9 @@ def func2():
for paren in "([{":
self._check_error(paren + "1 + 2", f"\\{paren}' was never closed")
+ for paren in "([{":
+ self._check_error(f"a = {paren} 1, 2, 3\nb=3", f"\\{paren}' was never closed")
+
for paren in ")]}":
self._check_error(paren + "1 + 2", f"unmatched '\\{paren}'")