aboutsummaryrefslogtreecommitdiff
path: root/tests/micropython/viper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/viper.py')
-rw-r--r--tests/micropython/viper.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/micropython/viper.py b/tests/micropython/viper.py
index 5d4f4fd7b..7e6ed67d4 100644
--- a/tests/micropython/viper.py
+++ b/tests/micropython/viper.py
@@ -79,3 +79,12 @@ except SystemError as e:
#@micropython.viper
#def g() -> uint:
# return -1
+
+# calling GC after defining the function
+@micropython.viper
+def viper_gc() -> int:
+ return 1
+print(viper_gc())
+import gc
+gc.collect()
+print(viper_gc())