circuitpython/tests/micropython/memstats.py
Scott Shawcroft b057fb8a4b
codeformat
2021-04-19 22:22:44 -07:00

18 lines
422 B
Python

# tests meminfo functions in micropython module
import micropython
# these functions are not always available
if not hasattr(micropython, "mem_total"):
print("SKIP")
else:
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)