Skip to content

Commit 2d401cc

Browse files
committed
Update test to parse invalid syntax
1 parent 73ca857 commit 2d401cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Tests/test_ast.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,11 @@ def test_literal_eval_cp35572(self):
13401340

13411341
def test_ipy3_gh686(self):
13421342
"""https://github.com/IronLanguages/ironpython3/issues/686"""
1343+
# check that we can parse invalid starred expression code
1344+
x = ast.parse("*a")
1345+
with self.assertRaises(SyntaxError):
1346+
compile(x, "", "exec")
1347+
13431348
# check that compiling ast.Starred works properly
13441349
x = ast.parse("*a, = [1]")
13451350
c = compile(x, "", "exec")

0 commit comments

Comments
 (0)