From 5dbd97bdfb165c3bc9a8cbdd74dcc50f7cbf1c94 Mon Sep 17 00:00:00 2001 From: Teknium Date: Sun, 26 Apr 2026 19:52:17 -0700 Subject: [PATCH] fix(tests): update copilot_acp subprocess.Popen patch paths to acp_adapter.copilot_client Main added two HOME-handling tests (test_run_prompt_prefers_profile_home_when_available, test_run_prompt_passes_home_when_parent_env_is_clean) after PR #14424 was written. These patch 'agent.copilot_acp_client.subprocess.Popen', but the shim module no longer has 'subprocess' imported. Update patch strings to target the real module location. Follow-up commit on the salvage PR; kshitijk4poor's original commit is preserved above. --- tests/agent/test_copilot_acp_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/agent/test_copilot_acp_client.py b/tests/agent/test_copilot_acp_client.py index 584330ca79..1968b40b59 100644 --- a/tests/agent/test_copilot_acp_client.py +++ b/tests/agent/test_copilot_acp_client.py @@ -181,7 +181,7 @@ def test_run_prompt_prefers_profile_home_when_available(monkeypatch, tmp_path): captured = {} client = _make_home_client(tmp_path) - with _patch("agent.copilot_acp_client.subprocess.Popen", side_effect=_fake_popen_capture(captured)): + with _patch("acp_adapter.copilot_client.subprocess.Popen", side_effect=_fake_popen_capture(captured)): with pytest.raises(RuntimeError, match="Could not start Copilot ACP command"): client._run_prompt("hello", timeout_seconds=1) @@ -195,7 +195,7 @@ def test_run_prompt_passes_home_when_parent_env_is_clean(monkeypatch, tmp_path): captured = {} client = _make_home_client(tmp_path) - with _patch("agent.copilot_acp_client.subprocess.Popen", side_effect=_fake_popen_capture(captured)): + with _patch("acp_adapter.copilot_client.subprocess.Popen", side_effect=_fake_popen_capture(captured)): with pytest.raises(RuntimeError, match="Could not start Copilot ACP command"): client._run_prompt("hello", timeout_seconds=1)