Summary
The argv assertion in tests/runs/test_runner.py (test_argv_for_rf3_partial_matches_bash, around Line 29) was relaxed to check the run_grid_search.py script path by substring instead of an exact match. However, runner._build_argv() switches to a direct Python executable whenever a baked pixi env (e.g. .pixi/envs/rf3/bin/python) is detected on the machine running the tests. This means the test can still fail non-deterministically on machines/CI runners that already have a baked pixi env, even with the looser substring check, because the ["pixi", "run", -e", "rf3", "python"] prefix assertion assumes the pixi code path is always taken.
Required change
- In
tests/runs/test_runner.py, force the pixi code path before asserting the ["pixi", "run", "-e", "rf3", "python"] prefix, e.g. via monkeypatch.setenv("SAMPLEWORKS_FORCE_PIXI", "1") in test_argv_for_rf3_partial_matches_bash.
- Verify no other tests in the same file rely on the default (non-forced) baked-env detection behavior in a way that would be affected.
Affected files
tests/runs/test_runner.py
Acceptance criteria
test_argv_for_rf3_partial_matches_bash passes deterministically regardless of whether a baked pixi env exists on the test-running machine.
- No regression to other runner tests that intentionally exercise baked-env detection (e.g.
test_uses_baked_env_python_when_available).
References
Requested by: @marcuscollins
cc: @manzuoni-astera @xraymemory
Summary
The argv assertion in
tests/runs/test_runner.py(test_argv_for_rf3_partial_matches_bash, around Line 29) was relaxed to check therun_grid_search.pyscript path by substring instead of an exact match. However,runner._build_argv()switches to a direct Python executable whenever a baked pixi env (e.g..pixi/envs/rf3/bin/python) is detected on the machine running the tests. This means the test can still fail non-deterministically on machines/CI runners that already have a baked pixi env, even with the looser substring check, because the["pixi", "run", -e", "rf3", "python"]prefix assertion assumes the pixi code path is always taken.Required change
tests/runs/test_runner.py, force the pixi code path before asserting the["pixi", "run", "-e", "rf3", "python"]prefix, e.g. viamonkeypatch.setenv("SAMPLEWORKS_FORCE_PIXI", "1")intest_argv_for_rf3_partial_matches_bash.Affected files
tests/runs/test_runner.pyAcceptance criteria
test_argv_for_rf3_partial_matches_bashpasses deterministically regardless of whether a baked pixi env exists on the test-running machine.test_uses_baked_env_python_when_available).References
Requested by: @marcuscollins
cc: @manzuoni-astera @xraymemory