diff options
author | Damien George <damien@micropython.org> | 2023-11-20 23:04:55 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-02-07 13:25:09 +1100 |
commit | b87bbaeb43ddbd603b6ac3266ccc15815198b5a7 (patch) | |
tree | 768abedede5042051967a9e73d6354619a4acd71 /tests/micropython/import_mpy_native.py | |
parent | 5804aa020452c9fe115c53ce9514b442945832bb (diff) |
tests: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/micropython/import_mpy_native.py')
-rw-r--r-- | tests/micropython/import_mpy_native.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/micropython/import_mpy_native.py b/tests/micropython/import_mpy_native.py index da20746b2..8f5de25a0 100644 --- a/tests/micropython/import_mpy_native.py +++ b/tests/micropython/import_mpy_native.py @@ -1,11 +1,10 @@ # test importing of .mpy files with native code try: - import sys, io, os + import sys, io, vfs sys.implementation._mpy io.IOBase - os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -110,7 +109,7 @@ user_files = { # fmt: on # create and mount a user filesystem -os.mount(UserFS(user_files), "/userfs") +vfs.mount(UserFS(user_files), "/userfs") sys.path.append("/userfs") # import .mpy files from the user filesystem @@ -123,5 +122,5 @@ for i in range(len(user_files)): print(mod, "ValueError", er) # unmount and undo path addition -os.umount("/userfs") +vfs.umount("/userfs") sys.path.pop() |