test: fix Windows venv path in CtrlRegen runner test

The runner prefers .venv/Scripts/python.exe on Windows, but the test
hardcoded the POSIX .venv/bin/python layout, so it fell back to
sys.executable and failed the Windows CI leg.
This commit is contained in:
Guillaume Meyer (The Opinionated Man)
2026-08-13 08:56:43 -07:00
parent 8d8fe7ad84
commit 40b160bb2a
+5 -2
View File
@@ -223,8 +223,11 @@ def test_run_ctrlregen_clean_prefers_venv_python(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch,
):
upstream = tmp_path / "upstream"
(upstream / ".venv" / "bin").mkdir(parents=True)
venv_python = upstream / ".venv" / "bin" / "python"
if os.name == "nt":
venv_python = upstream / ".venv" / "Scripts" / "python.exe"
else:
venv_python = upstream / ".venv" / "bin" / "python"
venv_python.parent.mkdir(parents=True)
venv_python.write_text("")
captured: dict = {}