Skip to content

Commit 4c8f1c2

Browse files
committed
Add an extra test
1 parent dbe8857 commit 4c8f1c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_syntax.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,14 @@ def test_invalid_line_continuation_left_recursive(self):
987987
self._check_error("A.\u03bc\\\n",
988988
"unexpected EOF while parsing")
989989

990+
def test_error_parenthesis(self):
991+
for paren in "([{":
992+
self._check_error(paren + "1 + 2", f"\\{paren}' was never closed")
993+
994+
for paren in ")]}":
995+
self._check_error(paren + "1 + 2", f"unmatched '\\{paren}'")
996+
997+
990998
def test_main():
991999
support.run_unittest(SyntaxTestCase)
9921000
from test import test_syntax

0 commit comments

Comments
 (0)