Commit fea7fe45 authored by Radomir Dopieralski's avatar Radomir Dopieralski Committed by Paul Sokolovsky
Browse files

tests/extmod/vfs_fat_ramdisk: Add tests for VFS.umount()

Try to un-mount a file system and re-mount it again.
parent 26295e04
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']
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment