diff --git a/tests/extmod/vfs_fat_fileio.py b/tests/extmod/vfs_fat_fileio.py index 4e0dc60194..f050d94e27 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 4e34e83a82..a09442ae80 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