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