From d83945f1368d15136d4a48ed8e4593332a0e513a Mon Sep 17 00:00:00 2001 From: Mads Lorentzen Date: Tue, 27 Oct 2026 08:23:58 +0100 Subject: [PATCH] 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 --- tests/test_verify_pdf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_verify_pdf.py b/tests/test_verify_pdf.py index 84c776d8..da1b1b42 100644 --- a/tests/test_verify_pdf.py +++ b/tests/test_verify_pdf.py @@ -364,7 +364,10 @@ class DumpTargetTests(unittest.TestCase): def test_symlink_out_of_cv_is_refused(self): link = self.root / "cv" / "main_acme.txt" - link.symlink_to(self.root / "outside.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")