diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-09 00:19:01 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-09 00:19:01 +1100 |
commit | 65cadbeb9d78bfc80314ff4f19fdb4aff5e78244 (patch) | |
tree | 968a6a918995d335e292a70b719632844f85b80d /tests/basics/python34.py | |
parent | 5653e3c72fc8555c6a060acf6447ac694a036053 (diff) | |
download | micropython-65cadbeb9d78bfc80314ff4f19fdb4aff5e78244.tar.gz micropython-65cadbeb9d78bfc80314ff4f19fdb4aff5e78244.zip |
tests: Update test suite to be compatible with CPython 3.6.
CPython 3.6 has a few changes that, when run on uPy's test suite, give a
different output to CPython 3.5. uPy currently officially supports the
3.4 language definition, but it's useful to be able to run the test suite
with 3.4/3.5/3.6 versions of CPython. This patch makes such changes to
support 3.6.
Diffstat (limited to 'tests/basics/python34.py')
-rw-r--r-- | tests/basics/python34.py | 9 |
1 files changed, 5 insertions, 4 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 |