test(verify_pdf): skip the symlink refusal check where symlinks need a privilege

On Windows, Path.symlink_to raises WinError 1314 for a user without
Developer Mode or admin rights, which turned the test into an error on a
developer machine. GitHub's Windows runners create symlinks fine, so CI
still exercises it; elsewhere the test now skips with the reason.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mads LorentzenandClaude Fable 5.1 authored and Mads Lorentzen committed 2026-10-27 16:07:33 +01:00
1 parent ae6c5aded5
commit d83945f136
1 file changed
+3
+3
View File
@@ -364,7 +364,10 @@ class DumpTargetTests(unittest.TestCase):
def test_symlink_out_of_cv_is_refused(self):
link = self.root / "cv" / "main_acme.txt"
try:
link.symlink_to(self.root / "outside.txt")
except OSError as exc: # Windows without Developer Mode or admin rights (WinError 1314)
self.skipTest(f"cannot create symlinks here: {exc}")
self.assertEqual(check_dump_target(link, self.root), "must not be a symlink")
@patch("tools.verify_pdf.verify_pdf")