summaryrefslogtreecommitdiff
path: root/tests/micropython/const.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/const.py')
-rw-r--r--tests/micropython/const.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/micropython/const.py b/tests/micropython/const.py
index 660a095f2..1faf22be9 100644
--- a/tests/micropython/const.py
+++ b/tests/micropython/const.py
@@ -7,9 +7,11 @@ Y = const(X + 456)
print(X, Y + 1)
+
def f():
print(X, Y + 1)
+
f()
_X = const(12)
@@ -17,9 +19,11 @@ _Y = const(_X + 34)
print(_X, _Y)
+
class A:
Z = const(1)
_Z = const(2)
print(Z, _Z)
-print(hasattr(A, 'Z'), hasattr(A, '_Z'))
+
+print(hasattr(A, "Z"), hasattr(A, "_Z"))