diff options
Diffstat (limited to 'tests/extmod')
| -rw-r--r-- | tests/extmod/vfs_lfs_mount.py | 7 | ||||
| -rw-r--r-- | tests/extmod/vfs_lfs_mount.py.exp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/extmod/vfs_lfs_mount.py b/tests/extmod/vfs_lfs_mount.py index 7ac19184b..9207f4a8c 100644 --- a/tests/extmod/vfs_lfs_mount.py +++ b/tests/extmod/vfs_lfs_mount.py @@ -58,6 +58,12 @@ def test(bdev, vfs_class): f.write('print("package")\n') import lfspkg + # chdir and import module from current directory (needs "" in sys.path) + uos.mkdir("/lfs/subdir") + uos.chdir("/lfs/subdir") + uos.rename("/lfs/lfsmod.py", "/lfs/subdir/lfsmod2.py") + import lfsmod2 + # umount uos.umount("/lfs") @@ -72,6 +78,7 @@ import sys sys.path.clear() sys.path.append("/lfs") +sys.path.append("") # run tests test(bdev, uos.VfsLfs1) diff --git a/tests/extmod/vfs_lfs_mount.py.exp b/tests/extmod/vfs_lfs_mount.py.exp index 90aff3501..b5c521531 100644 --- a/tests/extmod/vfs_lfs_mount.py.exp +++ b/tests/extmod/vfs_lfs_mount.py.exp @@ -1,6 +1,8 @@ test <class 'VfsLfs1'> hello from lfs package +hello from lfs test <class 'VfsLfs2'> hello from lfs package +hello from lfs |
