summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/extmod/vfs_fat_fileio.py5
-rw-r--r--tests/extmod/vfs_fat_fileio.py.exp1
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/extmod/vfs_fat_fileio.py b/tests/extmod/vfs_fat_fileio.py
index 4e0dc6019..f050d94e2 100644
--- a/tests/extmod/vfs_fat_fileio.py
+++ b/tests/extmod/vfs_fat_fileio.py
@@ -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")
diff --git a/tests/extmod/vfs_fat_fileio.py.exp b/tests/extmod/vfs_fat_fileio.py.exp
index 4e34e83a8..a09442ae8 100644
--- a/tests/extmod/vfs_fat_fileio.py.exp
+++ b/tests/extmod/vfs_fat_fileio.py.exp
@@ -9,6 +9,7 @@ h
e
True
d
+hello!world!
True
True
True