summaryrefslogtreecommitdiff
path: root/tests/run-tests.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/run-tests.py
parent5804aa020452c9fe115c53ce9514b442945832bb (diff)
tests: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/run-tests.py')
-rwxr-xr-xtests/run-tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-tests.py b/tests/run-tests.py
index c912f9d54..ba66eced4 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -59,7 +59,7 @@ os.environ["PYTHONIOENCODING"] = "utf-8"
# Code to allow a target MicroPython to import an .mpy from RAM
injected_import_hook_code = """\
-import sys, os, io
+import sys, os, io, vfs
class __File(io.IOBase):
def __init__(self):
self.off = 0
@@ -83,7 +83,7 @@ class __FS:
raise OSError(-2) # ENOENT
def open(self, path, mode):
return __File()
-os.mount(__FS(), '/__vfstest')
+vfs.mount(__FS(), '/__vfstest')
os.chdir('/__vfstest')
__import__('__injected_test')
"""