tests/extmod/vfs_fat_fileio: Add test for constructor of FileIO type.
This commit is contained in:
parent
f7545b200e
commit
6194336d81
@ -89,6 +89,11 @@ with vfs.open("foo_file.txt") as f2:
|
||||
f2.seek(-2, 2) # SEEK_END
|
||||
print(f2.read(1))
|
||||
|
||||
# using constructor of FileIO type to open a file
|
||||
FileIO = type(f)
|
||||
with FileIO("foo_file.txt") as f:
|
||||
print(f.read())
|
||||
|
||||
# dirs
|
||||
vfs.mkdir("foo_dir")
|
||||
|
||||
|
@ -9,6 +9,7 @@ h
|
||||
e
|
||||
True
|
||||
d
|
||||
hello!world!
|
||||
True
|
||||
True
|
||||
True
|
||||
|
Loading…
x
Reference in New Issue
Block a user