tests/extmod/vfs_posix.py: Only test statvfs if it exists.

Signed-off-by: Damien George <damien@micropython.org>
pull/8394/head
Damien George 2022-03-10 00:41:03 +11:00
rodzic 0149cd6b8b
commit d470c5a5ba
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -59,9 +59,10 @@ print(uos.listdir(temp_dir))
vfs = uos.VfsPosix(temp_dir)
print(list(i[0] for i in vfs.ilistdir(".")))
# stat, statvfs
# stat, statvfs (statvfs may not exist)
print(type(vfs.stat(".")))
print(type(vfs.statvfs(".")))
if hasattr(vfs, "statvfs"):
assert type(vfs.statvfs(".")) is tuple
# check types of ilistdir with str/bytes arguments
print(type(list(vfs.ilistdir("."))[0][0]))

Wyświetl plik

@ -7,7 +7,6 @@ hello
['test2']
['test2']
<class 'tuple'>
<class 'tuple'>
<class 'str'>
<class 'bytes'>
[]