tests/extmod/vfs_rom.py: Clear sys.path before running test.

Otherwise if the target has certain files/directories (such as "test") in
its filesystem then these interfere with the unit tests.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-05-07 13:56:01 +10:00
parent f7c53cd221
commit 487c94c253

View File

@@ -394,6 +394,7 @@ class TestMounted(TestBase):
def setUp(self): def setUp(self):
self.orig_sys_path = list(sys.path) self.orig_sys_path = list(sys.path)
self.orig_cwd = os.getcwd() self.orig_cwd = os.getcwd()
sys.path = []
vfs.mount(vfs.VfsRom(self.romfs), "/test_rom") vfs.mount(vfs.VfsRom(self.romfs), "/test_rom")
def tearDown(self): def tearDown(self):