summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/basics/python34.py9
-rw-r--r--tests/basics/python34.py.exp2
-rw-r--r--tests/basics/syntaxerror.py4
3 files changed, 7 insertions, 8 deletions
diff --git a/tests/basics/python34.py b/tests/basics/python34.py
index 7f7a1e015e..a23f347d64 100644
--- a/tests/basics/python34.py
+++ b/tests/basics/python34.py
@@ -1,4 +1,4 @@
-# tests that differ when running under Python 3.4 vs 3.5
+# tests that differ when running under Python 3.4 vs 3.5/3.6
# from basics/fun_kwvarargs.py
# test evaluation order of arguments (in 3.4 it's backwards, 3.5 it's fixed)
@@ -13,14 +13,15 @@ f4(*print_ret(['a', 'b']), kw_arg=print_ret(None))
{print_ret(1):print_ret(2)}
# from basics/syntaxerror.py
-# can't have multiple * or ** (in 3.5 we can)
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
-test_syntax("f(*a, *b)")
-test_syntax("f(**a, **b)")
+test_syntax("f(*a, *b)") # can't have multiple * (in 3.5 we can)
+test_syntax("f(**a, **b)") # can't have multiple ** (in 3.5 we can)
+test_syntax("() = []") # can't assign to empty tuple (in 3.6 we can)
+test_syntax("del ()") # can't delete empty tuple (in 3.6 we can)
# from basics/sys1.py
# uPy prints version 3.4
diff --git a/tests/basics/python34.py.exp b/tests/basics/python34.py.exp
index 637f77ce86..f497df3b80 100644
--- a/tests/basics/python34.py.exp
+++ b/tests/basics/python34.py.exp
@@ -5,5 +5,7 @@ None
1
SyntaxError
SyntaxError
+SyntaxError
+SyntaxError
3.4
3 4
diff --git a/tests/basics/syntaxerror.py b/tests/basics/syntaxerror.py
index e5cbbac060..4161de017b 100644
--- a/tests/basics/syntaxerror.py
+++ b/tests/basics/syntaxerror.py
@@ -46,9 +46,6 @@ test_syntax("f**2 = 1")
# can't assign to power of composite
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")
@@ -66,7 +63,6 @@ test_syntax("[a, b] += c")
test_syntax("def f(a=1, b): pass")
# can't delete these things
-test_syntax("del ()")
test_syntax("del f()")
test_syntax("del f[0]**2")
test_syntax("del (a for a in a)")