Skip to content

Commit af61c31

Browse files
Update Lib/test/test_syntax.py
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
1 parent 4994e57 commit af61c31

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Lib/test/test_syntax.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,11 +2063,27 @@
20632063
20642064
>>> with item,: pass
20652065
Traceback (most recent call last):
2066-
SyntaxError: single 'with' item has a trailing comma
2066+
SyntaxError: the last 'with' item has a trailing comma
20672067
20682068
>>> with item as x,: pass
20692069
Traceback (most recent call last):
2070-
SyntaxError: single 'with' item has a trailing comma
2070+
SyntaxError: the last 'with' item has a trailing comma
2071+
2072+
>>> with item1, item2,: pass
2073+
Traceback (most recent call last):
2074+
SyntaxError: the last 'with' item has a trailing comma
2075+
2076+
>>> with item1 as x, item2,: pass
2077+
Traceback (most recent call last):
2078+
SyntaxError: the last 'with' item has a trailing comma
2079+
2080+
>>> with item1 as x, item2 as y,: pass
2081+
Traceback (most recent call last):
2082+
SyntaxError: the last 'with' item has a trailing comma
2083+
2084+
>>> with item1, item2 as y,: pass
2085+
Traceback (most recent call last):
2086+
SyntaxError: the last 'with' item has a trailing comma
20712087
20722088
>>> import a from b
20732089
Traceback (most recent call last):

0 commit comments

Comments
 (0)