diff options
| author | Damien George <damien@micropython.org> | 2022-03-10 00:41:03 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-03-10 00:41:03 +1100 |
| commit | d470c5a5baa8660461b76585a57f2de28b30f5dc (patch) | |
| tree | e200307690c19bf6e3ad7cc40e3395c41762f82d /tests | |
| parent | 0149cd6b8b255907b49ec105146a2f238b07dbb8 (diff) | |
tests/extmod/vfs_posix.py: Only test statvfs if it exists.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/extmod/vfs_posix.py | 5 | ||||
| -rw-r--r-- | tests/extmod/vfs_posix.py.exp | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/extmod/vfs_posix.py b/tests/extmod/vfs_posix.py index f8c4aae40..2a14fc207 100644 --- a/tests/extmod/vfs_posix.py +++ b/tests/extmod/vfs_posix.py @@ -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])) diff --git a/tests/extmod/vfs_posix.py.exp b/tests/extmod/vfs_posix.py.exp index e7d68f38e..eb9ab4310 100644 --- a/tests/extmod/vfs_posix.py.exp +++ b/tests/extmod/vfs_posix.py.exp @@ -7,7 +7,6 @@ hello ['test2'] ['test2'] <class 'tuple'> -<class 'tuple'> <class 'str'> <class 'bytes'> [] |
