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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/micropython/const.py b/tests/micropython/const.py
index 457365c50..09717fd14 100644
--- a/tests/micropython/const.py
+++ b/tests/micropython/const.py
@@ -9,3 +9,15 @@ def f():
print(X, Y + 1)
f()
+
+_X = const(12)
+_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'))