__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import os
from thonny.common import path_startswith
def test_path_startswith():
assert path_startswith("/kala/pala", "/kala")
assert path_startswith("/kala/pala", "/kala/")
assert not path_startswith("/kala/pala", "/pala")
assert not path_startswith("/kalapala/pala", "/kala")
if os.name == "nt":
assert path_startswith("/kala/pala", "/KALA")
else:
assert not path_startswith("/kala/pala", "/KALA")
if os.name == "nt":
assert path_startswith("C:\\foo\\bar", "C:\\foo")
assert path_startswith("C:\\foo", "C:\\")
assert path_startswith("C:/foo", "C:\\")
assert path_startswith("C:\\foo", "C:/")
assert path_startswith("C:\\foo\\dir\\file", "C:\\foo")
assert path_startswith("C:/foo\\dir\\file", "c:\\FOO")
assert path_startswith("c:\\FOO\\dir\\file", "C:/foo")
assert path_startswith("C:\\FOO\\dir\\dir2\\..\\ee", "C:/foo/dir/ee")
assert path_startswith("c:\\foo\\bar.txt/kala\\pala", "C:\\foo\\bar.txt/kala")
assert path_startswith("c:\\foo\\bar.txt/kala\\pala", "C:\\")
assert not path_startswith("C:\\kalapala\\pala", "C:\\kala")
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| plugins | Folder | 0755 |
|
|
| __init__.py | File | 17 B | 0644 |
|
| test_common.py | File | 1.15 KB | 0644 |
|