circuitpython/tests/extmod/vfs_posix.py
Damien George 6a3d70db96 tests/extmod: Add vfs_posix.py test for uos.VfsPosix class.
Signed-off-by: Damien George <damien@micropython.org>
2020-11-29 17:31:24 +11:00

24 lines
351 B
Python

# 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("/")))