diff options
author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2020-03-10 15:14:35 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-03-11 14:43:03 +1100 |
commit | ed93778e004a2c6c2160f54d7362f14c5797d9c6 (patch) | |
tree | d529889de568e7e8bc1f9852826c8ed5aa8c3543 /tests/basics/io_stringio1.py | |
parent | 8a4ce6b79a09510fc5b970f2c019519f47852101 (diff) | |
download | micropython-ed93778e004a2c6c2160f54d7362f14c5797d9c6.tar.gz micropython-ed93778e004a2c6c2160f54d7362f14c5797d9c6.zip |
py/objstringio: Expose tell() on StringIO and BytesIO objects.
To match file objects.
Fixes issue #5581.
Diffstat (limited to 'tests/basics/io_stringio1.py')
-rw-r--r-- | tests/basics/io_stringio1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/basics/io_stringio1.py b/tests/basics/io_stringio1.py index 9f7c1e44ef..41089f22d5 100644 --- a/tests/basics/io_stringio1.py +++ b/tests/basics/io_stringio1.py @@ -34,6 +34,11 @@ a.write("foo") print(a.read()) a = io.StringIO() +print(a.tell()) +a.write("foo") +print(a.tell()) + +a = io.StringIO() a.close() for f in [a.read, a.getvalue, lambda:a.write("")]: # CPython throws for operations on closed I/O, MicroPython makes |