summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_userfs.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-11-20 23:04:55 +1100
committerDamien George <damien@micropython.org>2024-02-07 13:25:09 +1100
commitb87bbaeb43ddbd603b6ac3266ccc15815198b5a7 (patch)
tree768abedede5042051967a9e73d6354619a4acd71 /tests/extmod/vfs_userfs.py
parent5804aa020452c9fe115c53ce9514b442945832bb (diff)
downloadmicropython-b87bbaeb43ddbd603b6ac3266ccc15815198b5a7.tar.gz
micropython-b87bbaeb43ddbd603b6ac3266ccc15815198b5a7.zip
tests: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/vfs_userfs.py')
-rw-r--r--tests/extmod/vfs_userfs.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/extmod/vfs_userfs.py b/tests/extmod/vfs_userfs.py
index 5c487315eb..a7b87ec0b0 100644
--- a/tests/extmod/vfs_userfs.py
+++ b/tests/extmod/vfs_userfs.py
@@ -4,12 +4,9 @@
import sys
try:
- import io
+ import io, vfs
io.IOBase
- import os
-
- os.mount
except (ImportError, AttributeError):
print("SKIP")
raise SystemExit
@@ -79,7 +76,7 @@ user_files = {
"/usermod5.py": b"print('in usermod5')",
"/usermod6.py": b"print('in usermod6')",
}
-os.mount(UserFS(user_files), "/userfs")
+vfs.mount(UserFS(user_files), "/userfs")
# open and read a file
f = open("/userfs/data.txt")
@@ -110,5 +107,5 @@ UserFile.buffer_size = 1024
import usermod6
# unmount and undo path addition
-os.umount("/userfs")
+vfs.umount("/userfs")
sys.path.pop()