test(agent): use python3 in ExecTool workspace scope tests (#5064)

* test(agent): use python3 in ExecTool workspace scope tests (fixes #5062)

* test(agent): use python on Windows and python3 on POSIX in ExecTool workspace scope tests (fixes #5062)

* test(agent): share Python command fixture

---------

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
This commit is contained in:
flyzstu
2026-07-24 09:42:38 +08:00
committed by GitHub
co-authored by chengyongru
parent aae259c790
commit 8bcab8885e
2 changed files with 17 additions and 4 deletions
+7
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import os
from pathlib import Path
from types import SimpleNamespace
from unittest.mock import AsyncMock, MagicMock, patch
@@ -13,6 +14,12 @@ from nanobot.bus.queue import MessageBus
from nanobot.providers.base import LLMProvider
@pytest.fixture
def cmd_python() -> str:
"""Return the Python command name available to ExecTool tests."""
return "python" if os.name == "nt" else "python3"
def make_provider(
default_model: str = "test-model",
*,