diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/micropython/const.py | 2 | ||||
-rw-r--r-- | tests/micropython/const2.py | 2 | ||||
-rw-r--r-- | tests/micropython/const_error.py | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/micropython/const.py b/tests/micropython/const.py index 09717fd147..660a095f2c 100644 --- a/tests/micropython/const.py +++ b/tests/micropython/const.py @@ -1,5 +1,7 @@ # test constant optimisation +from micropython import const + X = const(123) Y = const(X + 456) diff --git a/tests/micropython/const2.py b/tests/micropython/const2.py index fb45884352..60085a1e04 100644 --- a/tests/micropython/const2.py +++ b/tests/micropython/const2.py @@ -1,5 +1,7 @@ # check that consts are not replaced in anything except standalone identifiers +from micropython import const + X = const(1) Y = const(2) Z = const(3) diff --git a/tests/micropython/const_error.py b/tests/micropython/const_error.py index b46efcae27..6d3d135b56 100644 --- a/tests/micropython/const_error.py +++ b/tests/micropython/const_error.py @@ -1,5 +1,7 @@ # make sure syntax error works correctly for bad const definition +from micropython import const + def test_syntax(code): try: exec(code) |