summaryrefslogtreecommitdiff
path: root/tests/micropython/heap_lock.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/heap_lock.py')
-rw-r--r--tests/micropython/heap_lock.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/micropython/heap_lock.py b/tests/micropython/heap_lock.py
index ca3f5806a..6d770d9ec 100644
--- a/tests/micropython/heap_lock.py
+++ b/tests/micropython/heap_lock.py
@@ -6,6 +6,7 @@ l = []
l2 = list(range(100))
micropython.heap_lock()
+micropython.heap_lock()
# general allocation on the heap
try:
@@ -19,6 +20,14 @@ try:
except MemoryError:
print('MemoryError')
+print(micropython.heap_unlock())
+
+# Should still fail
+try:
+ print([])
+except MemoryError:
+ print('MemoryError')
+
micropython.heap_unlock()
# check that allocation works after an unlock