Commit 6194336d authored by Damien George's avatar Damien George
Browse files

tests/extmod/vfs_fat_fileio: Add test for constructor of FileIO type.

parent f7545b20
...@@ -89,6 +89,11 @@ with vfs.open("foo_file.txt") as f2: ...@@ -89,6 +89,11 @@ with vfs.open("foo_file.txt") as f2:
f2.seek(-2, 2) # SEEK_END f2.seek(-2, 2) # SEEK_END
print(f2.read(1)) 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 # dirs
vfs.mkdir("foo_dir") vfs.mkdir("foo_dir")
......
...@@ -9,6 +9,7 @@ h ...@@ -9,6 +9,7 @@ h
e e
True True
d d
hello!world!
True True
True True
True True
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment