tests/heapalloc_bytesio: Test for BytesIO with preallocates space.

This commit is contained in:
Paul Sokolovsky 2017-02-02 00:38:38 +03:00
parent 50d3a9df67
commit b32880bd51
2 changed files with 14 additions and 0 deletions

View File

@ -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())

View File

@ -0,0 +1 @@
b'1234123412341234123412341234123412341234123412341234123412341234'