diff options
author | Damien George <damien.p.george@gmail.com> | 2015-04-04 22:05:30 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-04-04 22:05:30 +0100 |
commit | 9dd36404646f857c4f250537bac0d9a8ad041d25 (patch) | |
tree | c6509bcd3c7d5c2e67332110c582df2b5a5c669f /tests/micropython/memstats.py | |
parent | 7e758b1cf878312cab5d9d2825b36e7235ea10a3 (diff) |
tests: Add missing tests for builtins, and many other things.
Diffstat (limited to 'tests/micropython/memstats.py')
-rw-r--r-- | tests/micropython/memstats.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/micropython/memstats.py b/tests/micropython/memstats.py new file mode 100644 index 000000000..78e4d2473 --- /dev/null +++ b/tests/micropython/memstats.py @@ -0,0 +1,17 @@ +# 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) |