summaryrefslogtreecommitdiff
path: root/tests/extmod/vfs_userfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/vfs_userfs.py')
-rw-r--r--tests/extmod/vfs_userfs.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/extmod/vfs_userfs.py b/tests/extmod/vfs_userfs.py
index 570b83353..518373c70 100644
--- a/tests/extmod/vfs_userfs.py
+++ b/tests/extmod/vfs_userfs.py
@@ -1,21 +1,21 @@
# test VFS functionality with a user-defined filesystem
-# also tests parts of uio.IOBase implementation
+# also tests parts of io.IOBase implementation
-import usys
+import sys
try:
- import uio
+ import io
- uio.IOBase
- import uos
+ io.IOBase
+ import os
- uos.mount
+ os.mount
except (ImportError, AttributeError):
print("SKIP")
raise SystemExit
-class UserFile(uio.IOBase):
+class UserFile(io.IOBase):
def __init__(self, mode, data):
assert isinstance(data, bytes)
self.is_text = mode.find("b") == -1
@@ -69,16 +69,16 @@ user_files = {
"/usermod1.py": b"print('in usermod1')\nimport usermod2",
"/usermod2.py": b"print('in usermod2')",
}
-uos.mount(UserFS(user_files), "/userfs")
+os.mount(UserFS(user_files), "/userfs")
# open and read a file
f = open("/userfs/data.txt")
print(f.read())
# import files from the user filesystem
-usys.path.append("/userfs")
+sys.path.append("/userfs")
import usermod1
# unmount and undo path addition
-uos.umount("/userfs")
-usys.path.pop()
+os.umount("/userfs")
+sys.path.pop()