The test runner expects `print("SKIP")` to be followed by
`raise SystemExit`. Otherwise it waits for 10 seconds for the target to
do a soft reset before timing out and continuing.
Signed-off-by: Damien George <damien@micropython.org>
18 lines
410 B
Python
18 lines
410 B
Python
# tests meminfo functions in micropython module
|
|
|
|
import micropython
|
|
|
|
# these functions are not always available
|
|
if not hasattr(micropython, "mem_total"):
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
t = micropython.mem_total()
|
|
c = micropython.mem_current()
|
|
p = micropython.mem_peak()
|
|
|
|
l = list(range(10000))
|
|
|
|
print(micropython.mem_total() > t)
|
|
print(micropython.mem_current() > c)
|
|
print(micropython.mem_peak() > p)
|