MCPcopy
hub / github.com/pytest-dev/pytest / test_bestrelpath

Function test_bestrelpath

testing/test_pathlib.py:523–529  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

521
522
523def test_bestrelpath() -> None:
524 curdir = Path("/foo/bar/baz/path")
525 assert bestrelpath(curdir, curdir) == "."
526 assert bestrelpath(curdir, curdir / "hello" / "world") == "hello" + os.sep + "world"
527 assert bestrelpath(curdir, curdir.parent / "sister") == ".." + os.sep + "sister"
528 assert bestrelpath(curdir, curdir.parent) == ".."
529 assert bestrelpath(curdir, Path("hello")) == "hello"
530
531
532def test_commonpath() -> None:

Callers

nothing calls this directly

Calls 1

bestrelpathFunction · 0.90

Tested by

no test coverage detected