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_invalid.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_invalid.py')
-rw-r--r-- | tests/micropython/import_mpy_invalid.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/micropython/import_mpy_invalid.py b/tests/micropython/import_mpy_invalid.py index 36db102e9..c7f0a2c1a 100644 --- a/tests/micropython/import_mpy_invalid.py +++ b/tests/micropython/import_mpy_invalid.py @@ -1,10 +1,9 @@ # test importing of invalid .mpy files try: - import sys, io, os + import sys, io, vfs io.IOBase - os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -52,7 +51,7 @@ user_files = { } # 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 @@ -64,5 +63,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() |