tests/extmod: Add vfs_posix.py test for uos.VfsPosix class.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2020-11-28 12:21:40 +11:00
parent 5a7027915c
commit 6a3d70db96
2 changed files with 27 additions and 0 deletions

23
tests/extmod/vfs_posix.py Normal file
View File

@ -0,0 +1,23 @@
# Test for VfsPosix
try:
import uos
uos.VfsPosix
except (ImportError, AttributeError):
print("SKIP")
raise SystemExit
# getcwd and chdir
curdir = uos.getcwd()
uos.chdir("/")
print(uos.getcwd())
uos.chdir(curdir)
print(uos.getcwd() == curdir)
# stat
print(type(uos.stat("/")))
# listdir and ilistdir
print(type(uos.listdir("/")))

View File

@ -0,0 +1,4 @@
/
True
<class 'tuple'>
<class 'list'>