From 0c045a758ea6cda6bb6f36dae173fbe12f07c51e Mon Sep 17 00:00:00 2001 From: AlexanderSoftCode <208520214+AlexanderSoftCode@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:40:27 -0700 Subject: [PATCH] fix(test): skip symlink save test when symlinks are unavailable Creating symlinks on Windows requires Developer Mode or admin rights. Without them, test_save_replaces_symlink_instead_of_following_it errored with WinError 1314 during setup. Skip the test when os.symlink raises OSError, the same way the permissions test skips on Windows. --- tests/model/test_save.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/model/test_save.py b/tests/model/test_save.py index a8038eb..c457d67 100644 --- a/tests/model/test_save.py +++ b/tests/model/test_save.py @@ -93,7 +93,10 @@ def test_save_replaces_symlink_instead_of_following_it(self): target = os.path.join(self.temp_dir, "elsewhere.txt") with open(target, "wb") as f: f.write(b"keep") - os.symlink(target, self.save_path) + try: + os.symlink(target, self.save_path) + except OSError as e: + self.skipTest(f"symlink creation not permitted here: {e}") model = Model() model.add(Dense(self.NUM_FEATURES, 4)) @@ -418,4 +421,4 @@ def test_save_partial_configuration_with_fused_loss_and_adamw(self): # Accuracy omitted self.assertIsNone(compile_cfg["accuracy"]) -base_case.register_test_suites(globals(), TestModelSaveBase) \ No newline at end of file +base_case.register_test_suites(globals(), TestModelSaveBase)