Tests: skip the reports-link case when the host cannot link

os.symlink needs Developer Mode or an elevated token on Windows, so the test
errored with WinError 1314 instead of exercising own_reports. Skip it there
and keep it on hosts that can link.

Co-Authored-By: Hermes Agent (Nous Research) <noreply@nousresearch.com>
This commit is contained in:
Alexander
2026-10-28 10:30:03 +03:00
parent b6c936f82b
commit f4d6f9c0ed
+4 -1
View File
@@ -65,7 +65,10 @@ class AssetTests(unittest.TestCase):
(store / "minecraft").mkdir(parents=True)
reports = root / ".local" / "datagen" / "out" / "reports"
reports.parent.mkdir(parents=True)
reports.symlink_to(store)
try:
reports.symlink_to(store)
except OSError as e:
self.skipTest(f"this host cannot create symlinks: {e}")
harness.own_reports(root)
self.assertFalse(reports.exists() or reports.is_symlink())
self.assertTrue((store / "minecraft").is_dir())