Browse Source

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

Signed-off-by: Damien George <damien@micropython.org>
pull/6657/head
Damien George 4 years ago
parent
commit
6a3d70db96
  1. 23
      tests/extmod/vfs_posix.py
  2. 4
      tests/extmod/vfs_posix.py.exp

23
tests/extmod/vfs_posix.py

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

4
tests/extmod/vfs_posix.py.exp

@ -0,0 +1,4 @@
/
True
<class 'tuple'>
<class 'list'>
Loading…
Cancel
Save