tests/basics/gc1: Garbage collector threshold() coverage.
This commit is contained in:
parent
8a49905a2f
commit
964fb2450e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user