diff options
author | blmorris <bryan.morrissey@gmail.com> | 2015-08-04 19:45:30 -0400 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-08-13 22:56:32 +0100 |
commit | bdd78c31b68db5323796d93e0a17159806ce10fc (patch) | |
tree | 882f4679c6d8867584564a87162d954790981b58 /tests/io/file_seek.py | |
parent | c39093d801b8fb50c9af48902e9bb5faa9ab1e8b (diff) | |
download | micropython-bdd78c31b68db5323796d93e0a17159806ce10fc.tar.gz micropython-bdd78c31b68db5323796d93e0a17159806ce10fc.zip |
py: Add stream_tell method, and use for unix and stmhal file tell.
Diffstat (limited to 'tests/io/file_seek.py')
-rw-r--r-- | tests/io/file_seek.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/io/file_seek.py b/tests/io/file_seek.py index 922b169280..d6be662cbf 100644 --- a/tests/io/file_seek.py +++ b/tests/io/file_seek.py @@ -1,15 +1,19 @@ f = open("io/data/file1", "rb") print(f.seek(6)) print(f.read(5)) +print(f.tell()) print(f.seek(0, 1)) print(f.read(4)) +print(f.tell()) print(f.seek(-6, 2)) print(f.read(20)) +print(f.tell()) print(f.seek(0, 0)) print(f.read(5)) +print(f.tell()) f.close() @@ -17,4 +21,5 @@ f.close() f = open("io/data/file1", "rt") print(f.seek(6)) print(f.read(5)) +print(f.tell()) f.close() |