Skip to content
Snippets Groups Projects
Commit b32880bd authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/heapalloc_bytesio: Test for BytesIO with preallocates space.

parent 50d3a9df
No related branches found
No related tags found
No related merge requests found
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'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment