MCPcopy
hub / github.com/pex-tool/pex / test_commonpath_common

Function test_commonpath_common

tests/test_compatibility.py:68–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66
67
68def test_commonpath_common():
69 # type: () -> None
70
71 assert "a" == commonpath(["a", "a"])
72 assert "a" == commonpath(["a", "a/"])
73 assert "a" == commonpath(["a", "a/b"])
74 assert "a" == commonpath(["a/", "a/b"])
75 assert "a" == commonpath(["a/c", "a/b"])
76
77 assert "/a" == commonpath(["/a", "/a"])
78 assert "/a" == commonpath(["/a", "/a/"])
79 assert "/a" == commonpath(["/a", "/a/b"])
80 assert "/a" == commonpath(["/a/", "/a/b"])
81 assert "/a" == commonpath(["/a/c", "/a/b"])
82
83 assert "a" == commonpath(["./a", "./a"])
84 assert "a" == commonpath(["./a", "./a/"])
85 assert "a" == commonpath(["./a", "./a/b"])
86 assert "a" == commonpath(["./a/", "./a/b"])
87 assert "a" == commonpath(["./a/c", "./a/b"])
88
89 assert "../a" == commonpath(["../a", "../a"])
90 assert "../a" == commonpath(["../a", "../a/"])
91 assert "../a" == commonpath(["../a", "../a/b"])
92 assert "../a" == commonpath(["../a/", "../a/b"])
93 assert "../a" == commonpath(["../a/c", "../a/b"])
94
95 assert "a/b" == commonpath(["./a/./b", "./a/b"])
96 assert "a/../b" == commonpath(["./a/.././b", "a/../b/c"])
97
98
99def test_commonpath_none():

Callers

nothing calls this directly

Calls 1

commonpathFunction · 0.90

Tested by

no test coverage detected