You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests: Add test for extended arguments to stream .write() method.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import uio
|
||||
|
||||
try:
|
||||
uio.BytesIO
|
||||
except AttributeError:
|
||||
import sys
|
||||
print('SKIP')
|
||||
sys.exit()
|
||||
|
||||
buf = uio.BytesIO()
|
||||
|
||||
buf.write(b"foo", 2)
|
||||
print(buf.getvalue())
|
||||
|
||||
buf.write(b"foo", 100)
|
||||
print(buf.getvalue())
|
||||
|
||||
buf.write(b"foobar", 1, 3)
|
||||
print(buf.getvalue())
|
||||
|
||||
buf.write(b"foobar", 1, 100)
|
||||
print(buf.getvalue())
|
||||
|
||||
buf.write(b"foobar", 100, 100)
|
||||
print(buf.getvalue())
|
||||
@@ -0,0 +1,5 @@
|
||||
b'fo'
|
||||
b'fofoo'
|
||||
b'fofoooob'
|
||||
b'fofooooboobar'
|
||||
b'fofooooboobar'
|
||||
Reference in New Issue
Block a user