test(hooks): skip bash subprocess validator test on Windows
`bash` on the Windows CI runner resolves to `wsl.exe` which fails with "Windows Subsystem for Linux has no installed distributions." The shell hooks themselves are POSIX-only — Windows users use the Python entry point — so the bash-subprocess exercise is non-applicable on win32. The static-grep validator tests still run on every platform, so the shell-side validation is still asserted under Windows; only the live bash invocation is skipped.
This commit is contained in:
@@ -9,6 +9,9 @@ Written BEFORE the fix.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
class TestSaveHookAutoMines:
|
class TestSaveHookAutoMines:
|
||||||
@@ -94,6 +97,10 @@ class TestShellHookTranscriptValidation:
|
|||||||
'is_valid_transcript_path "$TRANSCRIPT_PATH"' in src
|
'is_valid_transcript_path "$TRANSCRIPT_PATH"' in src
|
||||||
), "validator must be invoked against TRANSCRIPT_PATH before mining"
|
), "validator must be invoked against TRANSCRIPT_PATH before mining"
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
sys.platform == "win32",
|
||||||
|
reason="shell hooks are POSIX-only; Windows CI bash maps to wsl.exe with no distro",
|
||||||
|
)
|
||||||
def test_validators_run_via_bash(self, tmp_path):
|
def test_validators_run_via_bash(self, tmp_path):
|
||||||
"""Source the validator out of each hook and exercise it directly."""
|
"""Source the validator out of each hook and exercise it directly."""
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|||||||
Reference in New Issue
Block a user