summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-01-23 03:10:37 (GMT)
committerGitHub <noreply@github.com>2022-01-23 03:10:37 (GMT)
commit633db1c4eb863a1340e45c353e36f2f8dcf5945c (patch)
tree86cf43c8bfb93e565e5bd4d29fdb9abe2ce98cc4 /Lib/test/test_syntax.py
parentf66ef3eab62c6d262ddbc8ab16fb43c8921ad33a (diff)
downloadcpython-633db1c4eb863a1340e45c353e36f2f8dcf5945c.zip
cpython-633db1c4eb863a1340e45c353e36f2f8dcf5945c.tar.gz
cpython-633db1c4eb863a1340e45c353e36f2f8dcf5945c.tar.bz2
[3.10] bpo-46240: Correct the error for unclosed parentheses when the tokenizer is not finished (GH-30378). (GH-30819)
(cherry picked from commit 70f415fb8b632247e28d87998642317ca7a652ae) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
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 b5bebb3..7aa93a0 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1513,6 +1513,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}'")