Skip to content

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.

test: skip POSIX mode-bit assertions on Windows

Tobi | Nordalux391a42a1a2ca
diff --git a/tests/test_extension_installer_injection.py b/tests/test_extension_installer_injection.py
index 962589e..ff3e8cc 100644
--- a/tests/test_extension_installer_injection.py
+++ b/tests/test_extension_installer_injection.py
@@ -11,6 +11,7 @@ credential-bearing settings file atomically with ``0600`` perms.
from __future__ import annotations
import json
+import os
import re
import subprocess
import sys
@@ -47,6 +48,9 @@ def test_installer_uses_safe_credential_pattern(rel: str, argc: int) -> None:
assert "0o600" in text, f"{rel} not writing settings with 0600 perms"
+ os.name != "posix", reason="asserts 0o600 mode bits, which Windows does not represent"
+)
@pytest.mark.parametrize("rel,argc", INSTALLERS.items())
def test_installer_credential_injection_is_inert(tmp_path: Path, rel: str, argc: int) -> None:
writer = _extract_writer((ROOT / rel).read_text(encoding="utf-8"))
diff --git a/tests/test_parasite_risk_and_extensions.py b/tests/test_parasite_risk_and_extensions.py
index d097560..349ea98 100644
--- a/tests/test_parasite_risk_and_extensions.py
+++ b/tests/test_parasite_risk_and_extensions.py
@@ -7,6 +7,7 @@ Tests for the v2 Checkpoint 5 deliverables:
from __future__ import annotations
+import os
import stat
import sys
from pathlib import Path
@@ -122,6 +123,12 @@ def test_extension_has_install_skill_and_docs(name: str, skill_dir: str) -> None
)
+_POSIX_ONLY = pytest.mark.skipif(
+ os.name != "posix", reason="the executable bit is a POSIX mode bit; Windows has none"
+)
+
+
+@_POSIX_ONLY
@pytest.mark.parametrize(
"name", ["ahrefs", "seranking", "profound", "bing-webmaster", "unlighthouse"],
)
@@ -131,6 +138,7 @@ def test_extension_install_script_is_executable(name: str) -> None:
assert mode & stat.S_IXUSR, f"{name}/install.sh must be executable for chmod"
+@_POSIX_ONLY
def test_every_extension_install_and_uninstall_is_executable() -> None:
"""All extensions ship executable install.sh + uninstall.sh — including v1 ones."""
ext_root = _REPO_ROOT / "extensions"
diff --git a/tests/test_runtime_installers.py b/tests/test_runtime_installers.py
index 1ae09de..7ec2d13 100644
--- a/tests/test_runtime_installers.py
+++ b/tests/test_runtime_installers.py
@@ -1,7 +1,10 @@
"""Static installer/runtime contract checks that do not mutate a real home."""
+import os
from pathlib import Path
+import pytest
+
ROOT = Path(__file__).resolve().parents[1]
@@ -29,10 +32,15 @@ def test_windows_installer_delegates_to_runtime_without_path_mutation() -> None:
assert "-Directory -Filter 'seo*'" not in text
-def test_launcher_is_executable_and_uses_safe_exec() -> None:
- launcher = ROOT / "bin/claude-seo"
- assert launcher.stat().st_mode & 0o100
- text = launcher.read_text(encoding="utf-8")
+ os.name != "posix", reason="the executable bit is a POSIX mode bit; Windows has none"
+)
+def test_launcher_is_executable() -> None:
+ assert (ROOT / "bin/claude-seo").stat().st_mode & 0o100
+
+
+def test_launcher_uses_safe_exec() -> None:
+ text = (ROOT / "bin/claude-seo").read_text(encoding="utf-8")
assert 'exec py -3 "${runtime}" "$@"' in text
assert 'exec python3 "${runtime}" "$@"' in text
assert 'exec python "${runtime}" "$@"' in text
diff --git a/tests/test_url_safety.py b/tests/test_url_safety.py
index e5b7778..37bc5d6 100644
--- a/tests/test_url_safety.py
+++ b/tests/test_url_safety.py
@@ -511,6 +511,9 @@ def test_route_handler_continues_when_both_ipv4_and_ipv6_public() -> None:
# ---------------------------------------------------------------------------
+ os.name != "posix", reason="asserts POSIX mode bits, which Windows does not represent"
+)
def test_save_oauth_token_writes_0o600(tmp_path, monkeypatch) -> None:
"""_save_oauth_token must produce a 0o600 file regardless of whether
the path existed beforehand or what the umask is."""
@@ -528,6 +531,9 @@ def test_save_oauth_token_writes_0o600(tmp_path, monkeypatch) -> None:
os.umask(old_umask)
+ os.name != "posix", reason="asserts POSIX mode bits, which Windows does not represent"
+)
def test_save_oauth_token_remediates_legacy_0o644(tmp_path, monkeypatch) -> None:
"""A pre-existing 0o644 token (v1.9.x default) is locked down on save."""
import google_auth # noqa: WPS433
@@ -591,6 +597,9 @@ def test_save_oauth_token_ignores_fchmod_oserror(tmp_path, monkeypatch) -> None:
}
+ os.name != "posix", reason="asserts POSIX mode bits, which Windows does not represent"
+)
def test_load_oauth_token_remediates_legacy_0o644(tmp_path, monkeypatch) -> None:
"""_load_oauth_token chmods the file before reading, so the next read
by any other process sees 0o600 even without a re-save."""