summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_fat_ramdisk.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/vfs_fat_ramdisk.py')
-rw-r--r--tests/extmod/vfs_fat_ramdisk.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py
index 7860d68124..57c8eeba89 100644
--- a/tests/extmod/vfs_fat_ramdisk.py
+++ b/tests/extmod/vfs_fat_ramdisk.py
@@ -1,5 +1,6 @@
import sys
import uos
+import uerrno
try:
uos.VfsFat
except AttributeError:
@@ -84,3 +85,15 @@ assert vfs.listdir() == ["sub_file.txt"]
vfs.chdir("..")
print("getcwd:", vfs.getcwd())
+
+
+vfs.umount()
+try:
+ vfs.listdir()
+except OSError as e:
+ assert e.args[0] == uerrno.ENODEV
+else:
+ raise AssertionError("expected OSError not thrown")
+
+vfs = uos.VfsFat(bdev, "/ramdisk")
+assert vfs.listdir() == ['foo_dir', 'moved-to-root.txt']