From 9a2f6a23921d6533786d2d2ee59a7bcc72332851 Mon Sep 17 00:00:00 2001 From: xraymemory Date: Tue, 2 Jun 2026 11:33:12 -0400 Subject: [PATCH 1/3] test(runs): isolate runner tests from ACTL env --- tests/runs/conftest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/runs/conftest.py b/tests/runs/conftest.py index 70cc7919..6d23afd1 100644 --- a/tests/runs/conftest.py +++ b/tests/runs/conftest.py @@ -9,9 +9,16 @@ @pytest.fixture(autouse=True) def force_pixi_argv(monkeypatch: pytest.MonkeyPatch) -> None: - """Keep argv assertions deterministic on machines with /app/.pixi present.""" + """Keep argv assertions deterministic across dev and ACTL image environments.""" monkeypatch.delenv("SAMPLEWORKS_GRID_SEARCH_SCRIPT", raising=False) monkeypatch.delenv("SAMPLEWORKS_PIXI_PROJECT_DIR", raising=False) + for var in ( + "RUNTIME_PIXI", + "SAMPLEWORKS_ALLOW_RUNTIME_PIXI", + "SAMPLEWORKS_REQUIRE_PREBUILT_PIXI", + "SAMPLEWORKS_SKIP_ENV_PREPARE", + ): + monkeypatch.delenv(var, raising=False) for var in list(os.environ): if var.startswith("SAMPLEWORKS_") and var.endswith("_PYTHON"): monkeypatch.delenv(var, raising=False) From 6989aa035b3134d34e4e065c35d964ed0d8fa651 Mon Sep 17 00:00:00 2001 From: xraymemory Date: Tue, 2 Jun 2026 13:39:41 -0400 Subject: [PATCH 2/3] test(runs): isolate workspace script detection --- tests/runs/conftest.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/runs/conftest.py b/tests/runs/conftest.py index 6d23afd1..c187c0f2 100644 --- a/tests/runs/conftest.py +++ b/tests/runs/conftest.py @@ -3,15 +3,22 @@ from __future__ import annotations import os +from pathlib import Path import pytest +from sampleworks.runs import runner @pytest.fixture(autouse=True) -def force_pixi_argv(monkeypatch: pytest.MonkeyPatch) -> None: +def force_pixi_argv(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None: """Keep argv assertions deterministic across dev and ACTL image environments.""" monkeypatch.delenv("SAMPLEWORKS_GRID_SEARCH_SCRIPT", raising=False) monkeypatch.delenv("SAMPLEWORKS_PIXI_PROJECT_DIR", raising=False) + monkeypatch.setattr( + runner, + "WORKSPACE_GRID_SEARCH_SCRIPT", + str(tmp_path / "missing-workspace" / "run_grid_search.py"), + ) for var in ( "RUNTIME_PIXI", "SAMPLEWORKS_ALLOW_RUNTIME_PIXI", From 25b3b65904a76918a889b2d1916db2efe788ac3c Mon Sep 17 00:00:00 2001 From: xraymemory Date: Tue, 2 Jun 2026 14:04:12 -0400 Subject: [PATCH 3/3] test(runs): avoid pixi prep in pre-job test --- tests/runs/test_runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/runs/test_runner.py b/tests/runs/test_runner.py index bec96b9d..26d304da 100644 --- a/tests/runs/test_runner.py +++ b/tests/runs/test_runner.py @@ -348,6 +348,7 @@ def test_pre_jobs_run_before_main_jobs(tmp_path: Path, monkeypatch: pytest.Monke """Sequential pre-jobs complete before regular jobs are launched.""" monkeypatch.setenv("HOME", str(tmp_path)) monkeypatch.setenv("SAMPLEWORKS_PIXI_PROJECT_DIR", str(tmp_path)) + monkeypatch.delenv("SAMPLEWORKS_FORCE_PIXI", raising=False) monkeypatch.setenv("SAMPLEWORKS_ANALYSIS_PYTHON", sys.executable) pre_script = tmp_path / "pre.py" main_script = tmp_path / "main.py"