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

Function samefile_nofollow

src/_pytest/pathlib.py:1049–1054  ·  src/_pytest/pathlib.py::samefile_nofollow

Test whether two paths reference the same actual file or directory. Unlike Path.samefile(), does not resolve symlinks.

(p1: Path, p2: Path)

Source from the content-addressed store, hash-verified

1047
1048
1049def samefile_nofollow(p1: Path, p2: Path) -> bool:
1050 class="st">"""Test whether two paths reference the same actual file or directory.
1051
1052 Unlike Path.samefile(), does not resolve symlinks.
1053 class="st">"""
1054 return os.path.samestat(p1.lstat(), p2.lstat())

Callers 1

collectMethod · 0.90

Calls 1

lstatMethod · 0.80

Tested by

no test coverage detected