Commit b32880bd authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/heapalloc_bytesio: Test for BytesIO with preallocates space.

parent 50d3a9df
import uio
import micropython
data = b"1234" * 16
buf = uio.BytesIO(64)
micropython.heap_lock()
buf.write(data)
micropython.heap_unlock()
print(buf.getvalue())
b'1234123412341234123412341234123412341234123412341234123412341234'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment