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/run-tests.py | |
parent | 5804aa020452c9fe115c53ce9514b442945832bb (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-x | tests/run-tests.py | 4 |
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') """ |