summaryrefslogtreecommitdiff
path: root/tests/micropython/heap_lock.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-14 00:32:34 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-14 00:32:34 +1100
commit34d0b3f85c9926d854acd7723b9e057744916ee0 (patch)
tree8ed2b83c3bbc735799db21ac1bd4bdf8bb090a9a /tests/micropython/heap_lock.py
parent6a4c6fc023292b42502b67b4ec3ece62d188ac14 (diff)
tests/micropython: Add tests for heap_lock, and emergency exceptions.
Diffstat (limited to 'tests/micropython/heap_lock.py')
-rw-r--r--tests/micropython/heap_lock.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/micropython/heap_lock.py b/tests/micropython/heap_lock.py
new file mode 100644
index 000000000..0f0a70eff
--- /dev/null
+++ b/tests/micropython/heap_lock.py
@@ -0,0 +1,14 @@
+# check that heap_lock/heap_unlock work as expected
+
+import micropython
+
+micropython.heap_lock()
+
+try:
+ print([])
+except MemoryError:
+ print('MemoryError')
+
+micropython.heap_unlock()
+
+print([])