From 34d0b3f85c9926d854acd7723b9e057744916ee0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 14 Oct 2016 00:32:34 +1100 Subject: tests/micropython: Add tests for heap_lock, and emergency exceptions. --- tests/micropython/heap_lock.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/micropython/heap_lock.py (limited to 'tests/micropython/heap_lock.py') 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([]) -- cgit v1.2.3