15 lines
200 B
Python
15 lines
200 B
Python
|
# check that heap_lock/heap_unlock work as expected
|
||
|
|
||
|
import micropython
|
||
|
|
||
|
micropython.heap_lock()
|
||
|
|
||
|
try:
|
||
|
print([])
|
||
|
except MemoryError:
|
||
|
print('MemoryError')
|
||
|
|
||
|
micropython.heap_unlock()
|
||
|
|
||
|
print([])
|