summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_fat_ramdisk.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-05-13 19:10:15 +1000
committerDamien George <damien.p.george@gmail.com>2017-05-13 19:10:15 +1000
commitcda09727b451b6b928cc0129c4be7d3127f1aaad (patch)
tree24812b6967f7eae816be84a7599165811b204f01 /tests/extmod/vfs_fat_ramdisk.py
parentf95e4e77823919dfe82b6711f1d25d2d8c5008fc (diff)
downloadmicropython-cda09727b451b6b928cc0129c4be7d3127f1aaad.tar.gz
micropython-cda09727b451b6b928cc0129c4be7d3127f1aaad.zip
tests/extmod/vfs_fat: Add test for ilistdir of a non-existent directory.
Diffstat (limited to 'tests/extmod/vfs_fat_ramdisk.py')
-rw-r--r--tests/extmod/vfs_fat_ramdisk.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py
index 89b40e3a24..fe72a8beff 100644
--- a/tests/extmod/vfs_fat_ramdisk.py
+++ b/tests/extmod/vfs_fat_ramdisk.py
@@ -93,3 +93,9 @@ uos.umount(vfs)
vfs = uos.VfsFat(bdev)
print(list(vfs.ilistdir(b"")))
+
+# list a non-existent directory
+try:
+ vfs.ilistdir(b"no_exist")
+except OSError as e:
+ print('ENOENT:', e.args[0] == uerrno.ENOENT)