micropython-lib/os.path/test_path.py

18 wiersze
411 B
Python
Czysty Zwykły widok Historia

2014-05-14 18:16:46 +00:00
import sys
sys.path[0] = "os"
from path import *
assert split("") == ("", "")
assert split("path") == ("", "path")
assert split("/") == ("/", "")
assert split("/foo") == ("/", "foo")
assert split("/foo/") == ("/foo", "")
assert split("/foo/bar") == ("/foo", "bar")
2014-05-14 18:16:13 +00:00
assert exists("test_path.py")
assert not exists("test_path.py--")
assert isdir("os")
assert not isdir("os--")
assert not isdir("test_path.py")