From 26a8082016c9b6032f0aa4e152f0a6fd83e3fcd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20SAILLANT?= <108685187+electron-rare@users.noreply.github.com> Date: Mon, 9 Mar 2026 02:12:54 +0100 Subject: [PATCH] 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 --- test/test_validate_specs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_validate_specs.py b/test/test_validate_specs.py index a7d8f92..357d5f8 100644 --- a/test/test_validate_specs.py +++ b/test/test_validate_specs.py @@ -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,