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

pull/2650/merge
Damien George 2016-12-02 15:37:58 +11:00
rodzic f7545b200e
commit 6194336d81
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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")

Wyświetl plik

@ -9,6 +9,7 @@ h
e
True
d
hello!world!
True
True
True