The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tests): skip POSIX-only and symlink tests on Windows CI
ColrWei80ea4cbde0c1
diff --git a/tests/test_atomic_replace_symlinks.py b/tests/test_atomic_replace_symlinks.pyindex 42c85568892..797d2b3a12d 100644--- a/tests/test_atomic_replace_symlinks.py+++ b/tests/test_atomic_replace_symlinks.py@@ -224,6 +224,7 @@ def test_atomic_replace_broken_symlink_creates_target(tmp_path: Path) -> None:[email protected]_symlinksdef test_atomic_replace_copy_fallback_preserves_symlink(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:@@ -506,6 +507,7 @@ def test_in_place_rewrite_never_exposes_a_truncated_file(assert observed == [5000][email protected]_symlinksdef test_symlinked_target_survives_a_contended_rename(tmp_path: Path, monkeypatch: pytest.MonkeyPatch, fast_replace_retries: None) -> None:diff --git a/tests/test_hermes_bootstrap.py b/tests/test_hermes_bootstrap.pyindex b95b50d9ad0..a97b05d1282 100644--- a/tests/test_hermes_bootstrap.py+++ b/tests/test_hermes_bootstrap.py@@ -120,6 +120,7 @@ class TestUserOptOut:[email protected]_onlyclass TestPosixNoOp:"""POSIX: zero behavior change. We don't touch LANG, LC_*, or anystdio. The goal is that Linux/macOS behave identically before and@@ -336,6 +337,7 @@ class TestHardenImportPath:class TestSuppressPlatformVerConsole:"""suppress_platform_ver_console: stub applied on Windows, no-op on POSIX."""+ @pytest.mark.linux_onlydef test_noop_on_posix(self):import platformhb = _fresh_import()diff --git a/tests/test_hermes_constants.py b/tests/test_hermes_constants.pyindex 86684fc0ea1..093bc9ad60f 100644--- a/tests/test_hermes_constants.py+++ b/tests/test_hermes_constants.py@@ -33,6 +33,7 @@ from hermes_constants import (class TestGetDefaultHermesRoot:"""Tests for get_default_hermes_root() — Docker/custom deployment awareness."""+ @pytest.mark.linux_onlydef test_no_hermes_home_returns_native(self, tmp_path, monkeypatch):"""When HERMES_HOME is not set, returns ~/.hermes."""monkeypatch.delenv("HERMES_HOME", raising=False)@@ -759,7 +760,10 @@ class TestGetHermesDir:"""self._set_home(tmp_path, monkeypatch)legacy = tmp_path / "pairing"- legacy.symlink_to(tmp_path / "does-not-exist")+ try:+ legacy.symlink_to(tmp_path / "does-not-exist")+ except (OSError, NotImplementedError) as exc:+ pytest.skip(f"Symlink not supported on this platform/permission: {exc}")new = tmp_path / "platforms" / "pairing"new.mkdir(parents=True)(new / "discord-approved.json").write_text("[]")@@ -773,7 +777,10 @@ class TestGetHermesDir:real.mkdir()(real / "cached.png").write_bytes(b"x")legacy = tmp_path / "image_cache"- legacy.symlink_to(real)+ try:+ legacy.symlink_to(real)+ except (OSError, NotImplementedError) as exc:+ pytest.skip(f"Symlink not supported on this platform/permission: {exc}")result = get_hermes_dir("cache/images", "image_cache")assert result == legacy