Skip to content

Commit abd5a57

Browse files
committed
tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.
1 parent 3990b17 commit abd5a57

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/io/bytesio_ext.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Extended stream operations on io.BytesIO
2+
try:
3+
import uio as io
4+
except ImportError:
5+
import io
6+
7+
a = io.BytesIO()
8+
print(a.seek(8))
9+
a.write(b"123")
10+
print(a.getvalue())
11+
12+
print(a.seek(0, 1))
13+
14+
print(a.seek(-1, 2))
15+
a.write(b"0")
16+
print(a.getvalue())
17+
18+
a.flush()
19+
print(a.getvalue())

0 commit comments

Comments
 (0)