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

Function cleanup_dead_symlinks

src/_pytest/pathlib.py:353–357  ·  view source on GitHub ↗
(root: Path)

Source from the content-addressed store, hash-verified

351
352
353def cleanup_dead_symlinks(root: Path) -> None:
354 for left_dir in root.iterdir():
355 if left_dir.is_symlink():
356 if not left_dir.resolve().exists():
357 left_dir.unlink()
358
359
360def cleanup_numbered_dir(

Callers 2

cleanup_numbered_dirFunction · 0.85
pytest_sessionfinishFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected