summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_userfs.py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-08-18 16:57:45 +1000
committerJim Mussared <jim.mussared@gmail.com>2023-06-08 17:54:24 +1000
commit4216bc7d1351feb8199e4ebbff1a9598aa1c5b02 (patch)
tree5085738ef65ab377c221f290c7fa90ec2acd4d29 /tests/extmod/vfs_userfs.py
parent5e50975a6dd9466afafbcd012c00078093fe1f57 (diff)
downloadmicropython-4216bc7d1351feb8199e4ebbff1a9598aa1c5b02.tar.gz
micropython-4216bc7d1351feb8199e4ebbff1a9598aa1c5b02.zip
tests: Replace umodule with module everywhere.
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
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 570b833534..518373c70a 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()