Skip to content

Commit

Permalink
Added test for parsing nested tuples and lists in for-statements
Browse files Browse the repository at this point in the history
  • Loading branch information
spkersten committed Oct 15, 2014
1 parent b63829e commit 2bbf167
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions mypy/test/data/parse.test
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,10 @@ MypyFile:1(
[case testForStatement]
for x in y:
pass
for x, y in z:
for x, (y, w) in z:
1
for [x, (y, w)] in z:
1
[out]
MypyFile:1(
ForStmt:1(
Expand All @@ -842,10 +844,24 @@ MypyFile:1(
PassStmt:2()))
ForStmt:3(
NameExpr(x)
NameExpr(y)
ParenExpr:3(
TupleExpr:3(
NameExpr(y)
NameExpr(w)))
NameExpr(z)
Block:3(
ExpressionStmt:4(
IntExpr(1))))
ForStmt:5(
ListExpr:5(
NameExpr(x)
ParenExpr:5(
TupleExpr:5(
NameExpr(y)
NameExpr(w))))
NameExpr(z)
Block:5(
ExpressionStmt:6(
IntExpr(1)))))

[case testGlobalDecl]
Expand Down

0 comments on commit 2bbf167

Please sign in to comment.