Skip to content

Commit 1f8e348

Browse files
committed
Change syntax_error test for consistent output
Python 3.11 changes the string representation of the SyntaxError triggered by this test - it now says "expected '('" instead of just "invalid syntax". This changes the test to use a different error (incomplete `for` loop) which still has just "invalid syntax" as its description in Python 3.11. This is the same 'bad code' used in the similar `test_stdin_syntaxerror` in the unit tests. Signed-off-by: Adam Williamson <[email protected]>
1 parent 01e3aa8 commit 1f8e348

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
def toto # [syntax-error]
1+
for # [syntax-error]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
syntax-error:1:10:None:None::invalid syntax (<unknown>, line 1):UNDEFINED
1+
syntax-error:1:5:None:None::invalid syntax (<unknown>, line 1):UNDEFINED

0 commit comments

Comments
 (0)