summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_basic.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-05-09 15:50:40 +1000
committerDamien George <damien.p.george@gmail.com>2017-05-09 15:50:40 +1000
commit9bd67d9fbc09823e33642e7ec709afbf88d11d0a (patch)
tree40017fcdf9ef888294742fe4e4e9412c5b061c98 /tests/extmod/vfs_basic.py
parentd00d062af2743832c22e3fdff7c88db894cf59d8 (diff)
downloadmicropython-9bd67d9fbc09823e33642e7ec709afbf88d11d0a.tar.gz
micropython-9bd67d9fbc09823e33642e7ec709afbf88d11d0a.zip
tests/extmod: Make some vfs tests fully unmount FSs before running.
Otherwise the existing FSs can interfere with the tests, and in some cases the tests can write to the real FS on the device.
Diffstat (limited to 'tests/extmod/vfs_basic.py')
-rw-r--r--tests/extmod/vfs_basic.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/extmod/vfs_basic.py b/tests/extmod/vfs_basic.py
index 1821a277dc..32bfe8ab4d 100644
--- a/tests/extmod/vfs_basic.py
+++ b/tests/extmod/vfs_basic.py
@@ -47,6 +47,10 @@ class Filesystem:
# first we umount any existing mount points the target may have
+try:
+ uos.umount('/')
+except OSError:
+ pass
for path in uos.listdir('/'):
uos.umount('/' + path)