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

Function test_commonpath

testing/test_pathlib.py:413–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411
412
413def test_commonpath() -> None:
414 path = Path("/foo/bar/baz/path")
415 subpath = path / "sampledir"
416 assert commonpath(path, subpath) == path
417 assert commonpath(subpath, path) == path
418 assert commonpath(Path(str(path) + "suffix"), path) == path.parent
419 assert commonpath(path, path.parent.parent) == path.parent.parent
420
421
422def test_visit_ignores_errors(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

commonpathFunction · 0.90

Tested by

no test coverage detected