10000 tests/extmod/vfs_posix.py: Only test statvfs if it exists. · micropython/micropython@d470c5a · GitHub
[go: up one dir, main page]

Skip to content

Commit d470c5a

Browse files
committed
tests/extmod/vfs_posix.py: Only test statvfs if it exists.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 0149cd6 commit d470c5a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/extmod/vfs_posix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@
5959
vfs = uos.VfsPosix(temp_dir)
6060
print(list(i[0] for i in vfs.ilistdir(".")))
6161

62-
# stat, statvfs
62+
# stat, statvfs (statvfs may not exist)
6363
print(type(vfs.stat(".")))
64-
print(type(vfs.statvfs(".")))
64+
if hasattr(vfs, "statvfs"):
65+
assert type(vfs.statvfs(".")) is tuple
6566

6667
# check types of ilistdir with str/bytes arguments
6768
print(type(list(vfs.ilistdir("."))[0][0]))

tests/extmod/vfs_posix.py.exp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ hello
77
['test2']
88
['test2']
99
<class 'tuple'>
10-
<class 'tuple'>
1110
<class 'str'>
1211
<class 'bytes'>
1312
[]

0 commit comments

Comments
 (0)
0