tests/extmod/vfs_posix.py: Only test statvfs if it exists.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
0149cd6b8b
commit
d470c5a5ba
|
@ -59,9 +59,10 @@ print(uos.listdir(temp_dir))
|
||||||
vfs = uos.VfsPosix(temp_dir)
|
vfs = uos.VfsPosix(temp_dir)
|
||||||
print(list(i[0] for i in vfs.ilistdir(".")))
|
print(list(i[0] for i in vfs.ilistdir(".")))
|
||||||
|
|
||||||
# stat, statvfs
|
# stat, statvfs (statvfs may not exist)
|
||||||
print(type(vfs.stat(".")))
|
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
|
# check types of ilistdir with str/bytes arguments
|
||||||
print(type(list(vfs.ilistdir("."))[0][0]))
|
print(type(list(vfs.ilistdir("."))[0][0]))
|
||||||
|
|
|
@ -7,7 +7,6 @@ hello
|
||||||
['test2']
|
['test2']
|
||||||
['test2']
|
['test2']
|
||||||
<class 'tuple'>
|
<class 'tuple'>
|
||||||
<class 'tuple'>
|
|
||||||
<class 'str'>
|
<class 'str'>
|
||||||
<class 'bytes'>
|
<class 'bytes'>
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in New Issue