diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-02-02 00:38:38 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-02-02 00:38:38 +0300 |
commit | b32880bd513b868465ad2ffd9b698c13ce7f964a (patch) | |
tree | 7f506eaba4f09e94fc2e01fce852e8e9bf2dee71 /tests/micropython/heapalloc_bytesio.py | |
parent | 50d3a9df671e5154c13a8218ad0e90fb9e78171f (diff) |
tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
Diffstat (limited to 'tests/micropython/heapalloc_bytesio.py')
-rw-r--r-- | tests/micropython/heapalloc_bytesio.py | 13 |
1 files changed, 13 insertions, 0 deletions
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()) |