fix(tests): skip symlink test when Windows lacks privilege
On Windows without Administrator or Developer Mode, Path.symlink_to raises WinError 1314 and crashes the suite. Skip with a clear remediation message instead. Fixes #650.
Greptile Summary
This PR makes the symlink-size test handle Windows privilege limits.
- Skips the symlink test when Windows reports privilege error 1314.
- Re-raises other symlink creation errors so setup failures still fail the test.
- Adds a remediation message for running as Administrator or enabling Developer Mode.
Confidence Score: 5/5
This looks safe to merge.
- No blocking issues found in the changed code.
Important Files Changed
| Filename | Overview |
|---|---|
| tests/test_local_sources.py | The symlink test now skips only the intended Windows privilege error and keeps other symlink failures visible. |
Reviews (2): Last reviewed commit: "fix(tests): only skip symlink test on Wi..." | Re-trigger Greptile
This fix looks correct and complete — catches the privilege error, shows a clear message, and re-raises other OSErrors. The production code (directory_size_bytes) already handles symlinks correctly via os.scandir() with follow_symlinks=False, so only the test needed changes. Ship it. 🚀
@greptile