mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
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.
This commit is contained in:
@@ -181,7 +181,7 @@ def test_run_prompt_prefers_profile_home_when_available(monkeypatch, tmp_path):
|
|||||||
captured = {}
|
captured = {}
|
||||||
client = _make_home_client(tmp_path)
|
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"):
|
with pytest.raises(RuntimeError, match="Could not start Copilot ACP command"):
|
||||||
client._run_prompt("hello", timeout_seconds=1)
|
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 = {}
|
captured = {}
|
||||||
client = _make_home_client(tmp_path)
|
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"):
|
with pytest.raises(RuntimeError, match="Could not start Copilot ACP command"):
|
||||||
client._run_prompt("hello", timeout_seconds=1)
|
client._run_prompt("hello", timeout_seconds=1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user