summaryrefslogtreecommitdiff
path: root/tests/micropython/native_const.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/native_const.py')
-rw-r--r--tests/micropython/native_const.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/micropython/native_const.py b/tests/micropython/native_const.py
new file mode 100644
index 000000000..37b491cf4
--- /dev/null
+++ b/tests/micropython/native_const.py
@@ -0,0 +1,14 @@
+# test loading constants in native functions
+
+@micropython.native
+def f():
+ return b'bytes'
+print(f())
+
+@micropython.native
+def f():
+ @micropython.native
+ def g():
+ return 123
+ return g
+print(f()())