fix(test): use sys.executable instead of bare python3 in validate_specs tests

The CI subprocess was invoking the system python3 instead of the venv
interpreter, causing compliance validation to fail when PyYAML is only
installed in the venv.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Clément SAILLANT
2026-03-09 02:12:54 +01:00
parent 67b27f7fd1
commit 26a8082016
+3 -2
View File
@@ -3,6 +3,7 @@ from __future__ import annotations
import json
import subprocess
import sys
import unittest
from pathlib import Path
@@ -36,7 +37,7 @@ def read_message(proc: subprocess.Popen[str]) -> dict:
class ValidateSpecsTests(unittest.TestCase):
def test_cli_json_mode_emits_machine_readable_summary(self):
proc = subprocess.run(
["python3", str(SCRIPT), "--json"],
[sys.executable, str(SCRIPT), "--json"],
cwd=REPO_ROOT,
capture_output=True,
text=True,
@@ -54,7 +55,7 @@ class ValidateSpecsTests(unittest.TestCase):
def test_mcp_server_supports_initialize_and_tools_list(self):
proc = subprocess.Popen(
["python3", str(SCRIPT), "--mcp"],
[sys.executable, str(SCRIPT), "--mcp"],
cwd=REPO_ROOT,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,