From 804ce793dec893356465c1cd3deae4aae5e53e2b Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 24 Jul 2026 10:42:10 -0700 Subject: [PATCH] test: update kwarg-snapshot assertions for the utf-8 subprocess guard - whatsapp taskkill + webhook gh-comment assert_called_with: add the two new kwargs - test_status fake_run: accept **kwargs so signature-strict stub doesn't TypeError on encoding/errors --- tests/gateway/test_status.py | 2 +- tests/gateway/test_webhook_integration.py | 2 ++ tests/gateway/test_whatsapp_connect.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_status.py b/tests/gateway/test_status.py index c39285b75344..2866379041e8 100644 --- a/tests/gateway/test_status.py +++ b/tests/gateway/test_status.py @@ -723,7 +723,7 @@ class TestTerminatePid: calls = [] monkeypatch.setattr(status, "_IS_WINDOWS", True) - def fake_run(cmd, capture_output=False, text=False, timeout=None, creationflags=0): + def fake_run(cmd, capture_output=False, text=False, timeout=None, creationflags=0, **kwargs): calls.append((cmd, capture_output, text, timeout, creationflags)) return SimpleNamespace(returncode=0, stdout="", stderr="") diff --git a/tests/gateway/test_webhook_integration.py b/tests/gateway/test_webhook_integration.py index 9312ac0e999f..dea960bba1d7 100644 --- a/tests/gateway/test_webhook_integration.py +++ b/tests/gateway/test_webhook_integration.py @@ -331,6 +331,8 @@ class TestGitHubCommentDelivery: ], capture_output=True, text=True, + encoding="utf-8", + errors="replace", timeout=30, ) # Delivery info is retained after send() so interim status messages diff --git a/tests/gateway/test_whatsapp_connect.py b/tests/gateway/test_whatsapp_connect.py index 52e36f5b7c2c..374ed74b8a7c 100644 --- a/tests/gateway/test_whatsapp_connect.py +++ b/tests/gateway/test_whatsapp_connect.py @@ -591,6 +591,8 @@ class TestHttpSessionLifecycle: ["taskkill", "/PID", "12345", "/T"], capture_output=True, text=True, + encoding="utf-8", + errors="replace", timeout=10, ) mock_proc.terminate.assert_not_called()