summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/gc1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/gc1.py')
-rw-r--r--tests/basics/gc1.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/basics/gc1.py b/tests/basics/gc1.py
index 140c8b0a60..be6c6faed2 100644
--- a/tests/basics/gc1.py
+++ b/tests/basics/gc1.py
@@ -20,3 +20,11 @@ if hasattr(gc, 'mem_free'):
# just test they execute and return an int
assert type(gc.mem_free()) is int
assert type(gc.mem_alloc()) is int
+
+if hasattr(gc, 'threshold'):
+ # uPy has this extra function
+ # check execution and returns
+ assert(gc.threshold(1) is None)
+ assert(gc.threshold() == 0)
+ assert(gc.threshold(-1) is None)
+ assert(gc.threshold() == -1)