tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
This commit is contained in:
parent
50d3a9df67
commit
b32880bd51
|
@ -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())
|
|
@ -0,0 +1 @@
|
|||
b'1234123412341234123412341234123412341234123412341234123412341234'
|
Loading…
Reference in New Issue