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

Function test_commonpath

testing/test_pathlib.py:532–538  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

530
531
532def test_commonpath() -> None:
533 path = Path("/foo/bar/baz/path")
534 subpath = path / "sampledir"
535 assert commonpath(path, subpath) == path
536 assert commonpath(subpath, path) == path
537 assert commonpath(Path(str(path) + "suffix"), path) == path.parent
538 assert commonpath(path, path.parent.parent) == path.parent.parent
539
540
541def test_visit_ignores_errors(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

commonpathFunction · 0.90

Tested by

no test coverage detected