-- Python 2 semantic analysis test cases.

[case testPrintStatement_python2]
print int, None
[out]
MypyFile:1(
  PrintStmt:1(
    NameExpr(int [builtins.int])
    NameExpr(None [builtins.None])
    Newline))

[case testPrintStatementWithTarget]
print >>int, None
[out]
MypyFile:1(
  PrintStmt:1(
    NameExpr(None [builtins.None])
    Target(
      NameExpr(int [builtins.int]))
    Newline))

[case testExecStatement]
exec None
exec None in int
exec None in int, str
[out]
MypyFile:1(
  ExecStmt:1(
    NameExpr(None [builtins.None]))
  ExecStmt:2(
    NameExpr(None [builtins.None])
    NameExpr(int [builtins.int]))
  ExecStmt:3(
    NameExpr(None [builtins.None])
    NameExpr(int [builtins.int])
    NameExpr(str [builtins.str])))

[case testVariableLengthTuple_python2]
from typing import Tuple, cast
cast(Tuple[int, ...], ())
[builtins_py2 fixtures/tuple.pyi]
[out]
MypyFile:1(
  ImportFrom:1(typing, [Tuple, cast])
  ExpressionStmt:2(
    CastExpr:2(
      TupleExpr:2()
      builtins.tuple[builtins.int])))

[case testTupleArgList_python2]
def f(x, (y, z)):
    x = y
[out]
MypyFile:1(
  FuncDef:1(
    f
    Args(
      Var(x)
      Var(__tuple_arg_2))
    Block:1(
      AssignmentStmt:1(
        TupleExpr:1(
          NameExpr(y* [l])
          NameExpr(z* [l]))
        NameExpr(__tuple_arg_2 [l]))
      AssignmentStmt:2(
        NameExpr(x [l])
        NameExpr(y [l])))))

[case testBackquoteExpr_python2]
`object`
[out]
MypyFile:1(
  ExpressionStmt:1(
    BackquoteExpr:1(
      NameExpr(object [builtins.object]))))
