Home
last modified time | relevance | path

Searched refs:test_syntax (Results 1 – 4 of 4) sorted by relevance

/AliOS-Things-master/components/py_engine/tests/basics/
A Dsyntaxerror.py9 def test_syntax(code): function
19 test_syntax("a \\a\n")
25 test_syntax("'abc")
28 test_syntax("!")
29 test_syntax("$")
30 test_syntax("`")
33 test_syntax(" a\n")
36 test_syntax("123z")
40 test_syntax('{1:')
43 test_syntax("1 = 2")
[all …]
A Dpython34.py22 def test_syntax(code): function
27 test_syntax("f(*a, *b)") # can't have multiple * (in 3.5 we can)
28 test_syntax("f(**a, **b)") # can't have multiple ** (in 3.5 we can)
29 test_syntax("f(*a, b)") # can't have positional after *
30 test_syntax("f(**a, b)") # can't have positional after **
31 test_syntax("() = []") # can't assign to empty tuple (in 3.6 we can)
32 test_syntax("del ()") # can't delete empty tuple (in 3.6 we can)
/AliOS-Things-master/components/py_engine/tests/micropython/
A Dconst_error.py6 def test_syntax(code): function
14 test_syntax("a = const(x)")
17 test_syntax("A = const(1); A = const(2)")
20 test_syntax("A = const(1 @ 2)")
21 test_syntax("A = const(1 / 2)")
22 test_syntax("A = const(1 ** -2)")
23 test_syntax("A = const(1 << -2)")
24 test_syntax("A = const(1 >> -2)")
25 test_syntax("A = const(1 % 0)")
26 test_syntax("A = const(1 // 0)")
A Ddecorator_error.py4 def test_syntax(code): function
12 test_syntax("@micropython.a\ndef f(): pass")
13 test_syntax("@micropython.a.b\ndef f(): pass")

Completed in 13 milliseconds