test(swarm): accept versioned Python executables

This commit is contained in:
tjb-tech
2026-05-06 10:05:11 +00:00
parent ffa7d9c06a
commit 57a9134997
+3 -2
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
from pathlib import Path
import sys
import pytest
@@ -138,8 +139,8 @@ async def test_subprocess_backend_passes_argv_list_not_shell_command(
assert captured.get("command") is None
argv = captured.get("argv")
assert isinstance(argv, list) and argv, "expected non-empty argv list"
# First element is the python interpreter.
assert argv[0].endswith(("python", "python3", "python.exe", "python3.exe"))
# First element is the exact Python interpreter selected for teammate spawn.
assert argv[0] == sys.executable
# Tail must include the worker invocation.
assert "--task-worker" in argv