summaryrefslogtreecommitdiff
path: root/tests/micropython/const2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/const2.py')
-rw-r--r--tests/micropython/const2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/micropython/const2.py b/tests/micropython/const2.py
index ed4720122..d8b68c25f 100644
--- a/tests/micropython/const2.py
+++ b/tests/micropython/const2.py
@@ -11,6 +11,7 @@ import micropython as X
print(globals()["X"])
+
# function name that matches a constant
def X():
print("function X", X)
@@ -18,6 +19,7 @@ def X():
globals()["X"]()
+
# arguments that match a constant
def f(X, *Y, **Z):
pass
@@ -25,6 +27,7 @@ def f(X, *Y, **Z):
f(1)
+
# class name that matches a constant
class X:
def f(self):
@@ -33,6 +36,7 @@ class X:
globals()["X"]().f()
+
# constant within a class
class A:
C1 = const(4)