MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_bestrelpath

Function test_bestrelpath

testing/test_pathlib.py:404–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

402
403
404def test_bestrelpath() -> None:
405 curdir = Path("/foo/bar/baz/path")
406 assert bestrelpath(curdir, curdir) == "."
407 assert bestrelpath(curdir, curdir / "hello" / "world") == "hello" + os.sep + "world"
408 assert bestrelpath(curdir, curdir.parent / "sister") == ".." + os.sep + "sister"
409 assert bestrelpath(curdir, curdir.parent) == ".."
410 assert bestrelpath(curdir, Path("hello")) == "hello"
411
412
413def test_commonpath() -> None:

Callers

nothing calls this directly

Calls 1

bestrelpathFunction · 0.90

Tested by

no test coverage detected