diff options
Diffstat (limited to 'tests/micropython/heap_lock.py')
-rw-r--r-- | tests/micropython/heap_lock.py | 14 |
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 0000000000..0f0a70eff1 --- /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([]) |