diff options
author | Damien George <damien@micropython.org> | 2020-11-28 12:21:40 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-11-29 17:31:24 +1100 |
commit | 6a3d70db9642e29b017f111abaf7fb6238a9b5a6 (patch) | |
tree | c325a4ef16e730d16ee83f8cf209d69eff919ab2 | |
parent | 5a7027915c3b9ec2dffc3af9530dad90b56b8cc0 (diff) |
tests/extmod: Add vfs_posix.py test for uos.VfsPosix class.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | tests/extmod/vfs_posix.py | 23 | ||||
-rw-r--r-- | tests/extmod/vfs_posix.py.exp | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/extmod/vfs_posix.py b/tests/extmod/vfs_posix.py new file mode 100644 index 000000000..3bea99365 --- /dev/null +++ b/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("/"))) diff --git a/tests/extmod/vfs_posix.py.exp b/tests/extmod/vfs_posix.py.exp new file mode 100644 index 000000000..1b1f59b43 --- /dev/null +++ b/tests/extmod/vfs_posix.py.exp @@ -0,0 +1,4 @@ +/ +True +<class 'tuple'> +<class 'list'> |