Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
abd5a57e
Commit
abd5a57e
authored
Jul 29, 2016
by
Paul Sokolovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.
parent
3990b171
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
tests/io/bytesio_ext.py
tests/io/bytesio_ext.py
+19
-0
No files found.
tests/io/bytesio_ext.py
0 → 100644
View file @
abd5a57e
# 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
())
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment