From a19eb54727a82e79bd09932a550046a135a074e1 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Tue, 19 May 2026 11:15:19 -0700 Subject: [PATCH] test(gateway-windows): make ctypes.windll monkeypatch tolerant on non-Windows Linux/macOS CI runners don't have ctypes.windll, so the elevated-gateway test fails at module load. Adding raising=False lets monkeypatch install the mock attribute without first requiring it to exist. --- tests/hermes_cli/test_gateway_windows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hermes_cli/test_gateway_windows.py b/tests/hermes_cli/test_gateway_windows.py index 65d05d63679..1bf6186fe23 100644 --- a/tests/hermes_cli/test_gateway_windows.py +++ b/tests/hermes_cli/test_gateway_windows.py @@ -139,7 +139,7 @@ def test_elevated_gateway_command_uses_pythonw_hidden_console(monkeypatch): monkeypatch.setattr(gateway_windows, "_current_profile_cli_args", lambda: ["--profile", "alice"]) monkeypatch.setattr(gateway_windows, "_derive_venv_pythonw", lambda exe: exe.replace("python.exe", "pythonw.exe")) monkeypatch.setattr(gateway_windows.sys, "executable", r"C:\Hermes\venv\Scripts\python.exe") - monkeypatch.setattr(gateway_windows.ctypes, "windll", FakeWindll()) + monkeypatch.setattr(gateway_windows.ctypes, "windll", FakeWindll(), raising=False) assert gateway_windows._launch_elevated_gateway_command("install", ["--start-now", "--elevated-handoff"])