blob: 33204d908c62623bece3d91ca21abe9d41a32b86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# 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)
|