kopia lustrzana https://github.com/micropython/micropython-lib
18 wiersze
411 B
Python
18 wiersze
411 B
Python
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")
|
|
|
|
assert exists("test_path.py")
|
|
assert not exists("test_path.py--")
|
|
|
|
assert isdir("os")
|
|
assert not isdir("os--")
|
|
assert not isdir("test_path.py")
|