summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/vfs_basic.py')
-rw-r--r--tests/extmod/vfs_basic.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/extmod/vfs_basic.py b/tests/extmod/vfs_basic.py
index 62b2a27738..9a9ef2ca61 100644
--- a/tests/extmod/vfs_basic.py
+++ b/tests/extmod/vfs_basic.py
@@ -74,6 +74,14 @@ print(uos.statvfs("/")[9] >= 32)
# getcwd when in root dir
print(uos.getcwd())
+# test operations on the root directory with nothing mounted, they should all fail
+for func in ("chdir", "listdir", "mkdir", "remove", "rmdir", "stat"):
+ for arg in ("x", "/x"):
+ try:
+ getattr(uos, func)(arg)
+ except OSError:
+ print(func, arg, "OSError")
+
# basic mounting and listdir
uos.mount(Filesystem(1), "/test_mnt")
print(uos.listdir())