diff --git a/tests/test_local_sources.py b/tests/test_local_sources.py index bd3448de8..34fededc8 100644 --- a/tests/test_local_sources.py +++ b/tests/test_local_sources.py @@ -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