From 173ccfe2dd0a06c4b5628dfe1c627626d90b26f1 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Tue, 15 Sep 2026 14:24:14 -0700 Subject: [PATCH] fix: drop dead shutil.which patches in bot-chat delivery tests Review finding (minor): after the module-first reorder in cron/scheduler_delivery.py the delivery.shutil.which -> /bin/hermes monkeypatches were unreachable; both tests already accept the module argv. --- tests/cron/test_bot_chat_cli_home.py | 1 - tests/cron/test_bot_chat_pending_identity.py | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/cron/test_bot_chat_cli_home.py b/tests/cron/test_bot_chat_cli_home.py index 66e182c0f1..dadcf5f923 100644 --- a/tests/cron/test_bot_chat_cli_home.py +++ b/tests/cron/test_bot_chat_cli_home.py @@ -43,7 +43,6 @@ def test_cli_keeps_discovered_home_when_launch_selection_changes(tmp_path, monke return subprocess.CompletedProcess(argv, 0, "", "") monkeypatch.setattr("tools.bot_live_delivery.find_canonical_live_owner", discover) - monkeypatch.setattr(delivery.shutil, "which", lambda _: "/bin/hermes") monkeypatch.setattr(delivery.subprocess, "run", run) try: assert delivery._deliver_to_bot_chat({"id": "job"}, "output", profile) is None diff --git a/tests/cron/test_bot_chat_pending_identity.py b/tests/cron/test_bot_chat_pending_identity.py index 748a01728f..bdb044fdb8 100644 --- a/tests/cron/test_bot_chat_pending_identity.py +++ b/tests/cron/test_bot_chat_pending_identity.py @@ -37,7 +37,6 @@ def test_deferred_destination_does_not_follow_root_changes(tmp_path, monkeypatch monkeypatch.setattr("hermes_cli.profiles.get_profile_dir", lambda _: other) run = Mock(return_value=subprocess.CompletedProcess([], 0, "", "")) monkeypatch.setattr(delivery.subprocess, "run", run) - monkeypatch.setattr(delivery.shutil, "which", lambda _: "/bin/hermes") if recipient == "desktop": lease, refusal = try_acquire_active_session( session_id="chat", surface="desktop", config={}, registry_home=home,