tests: Improve test coverage of py/compile.c.

This commit is contained in:
Damien George
2016-10-11 12:30:32 +11:00
parent e49153fb98
commit 5e22afce41
15 changed files with 60 additions and 2 deletions

View File

@@ -49,6 +49,9 @@ test_syntax("f[0]**2 = 1")
# can't assign to empty tuple
test_syntax("() = 1")
# can't have *x on RHS
test_syntax("x = *x")
# can't have multiple *x on LHS
test_syntax("*a, *b = c")
@@ -76,6 +79,7 @@ test_syntax("continue")
test_syntax("return")
test_syntax("yield")
test_syntax("nonlocal a")
test_syntax("await 1")
# error on uPy, warning on CPy
#test_syntax("def f():\n a = 1\n global a")