From b32880bd513b868465ad2ffd9b698c13ce7f964a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 2 Feb 2017 00:38:38 +0300 Subject: tests/heapalloc_bytesio: Test for BytesIO with preallocates space. --- tests/micropython/heapalloc_bytesio.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/micropython/heapalloc_bytesio.py (limited to 'tests/micropython/heapalloc_bytesio.py') diff --git a/tests/micropython/heapalloc_bytesio.py b/tests/micropython/heapalloc_bytesio.py new file mode 100644 index 000000000..311632851 --- /dev/null +++ b/tests/micropython/heapalloc_bytesio.py @@ -0,0 +1,13 @@ +import uio +import micropython + +data = b"1234" * 16 +buf = uio.BytesIO(64) + +micropython.heap_lock() + +buf.write(data) + +micropython.heap_unlock() + +print(buf.getvalue()) -- cgit v1.2.3