mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
tests: Add test for file.seek().
This commit is contained in:
12
tests/io/file_seek.py
Normal file
12
tests/io/file_seek.py
Normal file
@@ -0,0 +1,12 @@
|
||||
f = open("io/data/file1", "rb")
|
||||
print(f.seek(6))
|
||||
print(f.read(5))
|
||||
|
||||
print(f.seek(0, 1))
|
||||
print(f.read(4))
|
||||
|
||||
print(f.seek(-6, 2))
|
||||
print(f.read(20))
|
||||
|
||||
print(f.seek(0, 0))
|
||||
print(f.read(5))
|
||||
Reference in New Issue
Block a user