From d82cdf75c1586c95ec9c3aa6ce7d5c9ce0f60a3d Mon Sep 17 00:00:00 2001 From: ciregenz Date: Mon, 7 Sep 2026 10:39:07 -0700 Subject: [PATCH] [eric] tests: the reaper's ps-fed tests pin the POSIX path, a Windows runner rightly took the PowerShell path and never read the fake (ENG-490) Co-Authored-By: Claude Fable 5.1 --- backend/tests/test_reap_ghost_runtimes.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/tests/test_reap_ghost_runtimes.py b/backend/tests/test_reap_ghost_runtimes.py index d201f2b0..a1b13157 100644 --- a/backend/tests/test_reap_ghost_runtimes.py +++ b/backend/tests/test_reap_ghost_runtimes.py @@ -11,6 +11,13 @@ from unittest.mock import patch from backend.apps.outputs import reap_ghost_runtimes as mod +@pytest.fixture(autouse=True) +def p_posix_scan(monkeypatch): + """Every test below feeds the reaper a fake `ps`; on a Windows runner the code rightly took the PowerShell + path and never read it (CI run 8, 5 red). The two Windows tests set p_is_windows True themselves.""" + monkeypatch.setattr(mod, "p_is_windows", lambda: False) + + def p_ps(pid_args: str, pid_ppid: str): """Fake `ps` with two different outputs depending on the requested format.""" class R: