diff --git a/tests/extmod/vfs_fat_more.py b/tests/extmod/vfs_fat_more.py index baec96787b..ae340dde8f 100644 --- a/tests/extmod/vfs_fat_more.py +++ b/tests/extmod/vfs_fat_more.py @@ -114,3 +114,11 @@ uos.umount('/') print(uos.getcwd()) print(uos.listdir()) print(uos.listdir('sys')) + +# test importing a file from a mounted FS +import sys +sys.path.clear() +sys.path.append('/sys') +with open('sys/test_module.py', 'w') as f: + f.write('print("test_module!")') +import test_module diff --git a/tests/extmod/vfs_fat_more.py.exp b/tests/extmod/vfs_fat_more.py.exp index aaca3cc75e..24429ee095 100644 --- a/tests/extmod/vfs_fat_more.py.exp +++ b/tests/extmod/vfs_fat_more.py.exp @@ -26,3 +26,4 @@ mkdir OSError True / ['sys'] [] +test_module!