The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(cli): skip the permission-preservation cases on Windows
briandevansc005546cbc4c
diff --git a/tests/hermes_cli/test_migrate_xai.py b/tests/hermes_cli/test_migrate_xai.pyindex cf30099161e..74099b2969f 100644--- a/tests/hermes_cli/test_migrate_xai.py+++ b/tests/hermes_cli/test_migrate_xai.py@@ -1,6 +1,7 @@"""Tests for ``hermes migrate xai`` — apply path with ruamel round-trip."""from __future__ import annotations+import sysfrom pathlib import Pathimport pytest@@ -269,6 +270,7 @@ class TestCrashDurability:assert real.read_text(encoding="utf-8") == link.read_text(encoding="utf-8")assert "grok-4.3" in real.read_text(encoding="utf-8")+ @pytest.mark.skipif(sys.platform == "win32", reason="POSIX permission bits")def test_existing_file_mode_is_preserved(self, trap_config: Path):"""Managed (NixOS 0640) and container installs widen config.yamldeliberately; the migration must not silently tighten it to 0600."""diff --git a/tests/hermes_cli/test_profile_distribution.py b/tests/hermes_cli/test_profile_distribution.pyindex dc6a45dfe44..b0282efe854 100644--- a/tests/hermes_cli/test_profile_distribution.py+++ b/tests/hermes_cli/test_profile_distribution.py@@ -10,6 +10,7 @@ mocking git would just test the mock.from __future__ import annotations+import sysfrom pathlib import Pathimport pytest@@ -720,6 +721,9 @@ class TestManifestCrashDurability:# No temp file left behind next to the manifest.assert list(tmp_path.glob("*.tmp")) == []+ @pytest.mark.skipif(+ sys.platform == "win32", reason="POSIX permission bits"+ )def test_existing_file_mode_is_preserved(self, tmp_path):import osimport statdiff --git a/tests/hermes_cli/test_uninstall_shell_configs.py b/tests/hermes_cli/test_uninstall_shell_configs.pyindex ccb5fc1cce9..4cc9bc1b974 100644--- a/tests/hermes_cli/test_uninstall_shell_configs.py+++ b/tests/hermes_cli/test_uninstall_shell_configs.py@@ -10,6 +10,7 @@ from __future__ import annotationsimport osimport stat+import sysfrom pathlib import Pathimport pytest@@ -104,6 +105,7 @@ class TestCrashDurability:assert "# Hermes Agent" not in real.read_text(encoding="utf-8")assert "export EDITOR=vim" in real.read_text(encoding="utf-8")+ @pytest.mark.skipif(sys.platform == "win32", reason="POSIX permission bits")def test_existing_file_mode_is_preserved(self, fake_home: Path):"""Shell rc files are normally 0644; uninstalling must not change that."""rc = fake_home / ".zshrc"diff --git a/tests/hermes_cli/test_web_profile_soul_writes.py b/tests/hermes_cli/test_web_profile_soul_writes.pyindex e912110fc55..752529666fd 100644--- a/tests/hermes_cli/test_web_profile_soul_writes.py+++ b/tests/hermes_cli/test_web_profile_soul_writes.py@@ -14,6 +14,7 @@ from __future__ import annotationsimport osimport stat+import sysfrom pathlib import Pathimport pytest@@ -96,6 +97,7 @@ class TestSoulWriteDurability:# No temp file left behind in the profile directory.assert list(profile_dir.glob("*.tmp")) == []+ @pytest.mark.skipif(sys.platform == "win32", reason="POSIX permission bits")def test_existing_file_mode_is_preserved(self, client, profile_dir: Path):"""Profile SOUL.md is created 0644 and never run through``_secure_file``; saving from the dashboard must not change that."""