tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.

This commit is contained in:
Paul Sokolovsky 2016-07-29 23:00:25 +03:00
parent 3990b1715d
commit abd5a57ea1
1 changed files with 19 additions and 0 deletions

19
tests/io/bytesio_ext.py Normal file
View File

@ -0,0 +1,19 @@
# Extended stream operations on io.BytesIO
try:
import uio as io
except ImportError:
import io
a = io.BytesIO()
print(a.seek(8))
a.write(b"123")
print(a.getvalue())
print(a.seek(0, 1))
print(a.seek(-1, 2))
a.write(b"0")
print(a.getvalue())
a.flush()
print(a.getvalue())