summaryrefslogtreecommitdiff
path: root/tests/micropython/heapalloc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/heapalloc.py')
-rw-r--r--tests/micropython/heapalloc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/micropython/heapalloc.py b/tests/micropython/heapalloc.py
index c62428a08..b4b27d19b 100644
--- a/tests/micropython/heapalloc.py
+++ b/tests/micropython/heapalloc.py
@@ -20,7 +20,12 @@ def h():
g(i) # default arg (second one)
g(i, i) # 2 args
-# call h with heap allocation disabled
+# call h with heap allocation disabled and all memory used up
gc.disable()
+try:
+ while True:
+ 'a'.lower # allocates 1 cell for boundmeth
+except MemoryError:
+ pass
h()
gc.enable()