summaryrefslogtreecommitdiff
path: root/tests/micropython/heapalloc_bytesio.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython/heapalloc_bytesio.py')
-rw-r--r--tests/micropython/heapalloc_bytesio.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/micropython/heapalloc_bytesio.py b/tests/micropython/heapalloc_bytesio.py
new file mode 100644
index 000000000..2a8d50abe
--- /dev/null
+++ b/tests/micropython/heapalloc_bytesio.py
@@ -0,0 +1,19 @@
+try:
+ import uio
+except ImportError:
+ import sys
+ print("SKIP")
+ sys.exit()
+
+import micropython
+
+data = b"1234" * 16
+buf = uio.BytesIO(64)
+
+micropython.heap_lock()
+
+buf.write(data)
+
+micropython.heap_unlock()
+
+print(buf.getvalue())