Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/test_local_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ def test_directory_size_sums_flat_and_nested_files(tmp_path: Path) -> None:

def test_directory_size_skips_symlinks(tmp_path: Path) -> None:
_write_file(tmp_path / "real.txt", 100)
(tmp_path / "link.txt").symlink_to(tmp_path / "real.txt")
try:
(tmp_path / "link.txt").symlink_to(tmp_path / "real.txt")
except OSError:
pytest.skip(
"symlink creation unavailable; on Windows run as Administrator or enable Developer Mode"
)
# The symlink target is counted once via the real file, not doubled.
assert directory_size_bytes(tmp_path) == 100

Expand Down