From dde6f92d9665f16621e395dae880901e92efaf87 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 24 Jul 2026 20:35:11 -0400 Subject: [PATCH] test: stub hashcat potfile-recovery call in non-interactive integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pre-dispatch 'check POT file' step in main() shells out to the real hashcat binary, which is absent in CI, causing the four test_main_* tests to fail with FileNotFoundError. Stub _run_hashcat_show in the shared _run_main helper — these tests verify dispatch routing and prompt suppression, not potfile recovery. Co-Authored-By: Claude --- tests/test_noninteractive.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_noninteractive.py b/tests/test_noninteractive.py index 9386df3..07aba49 100644 --- a/tests/test_noninteractive.py +++ b/tests/test_noninteractive.py @@ -167,6 +167,10 @@ def test_dispatch_quick_multiple_rules_runs_each_as_separate_pass(tmp_path): def _run_main(monkeypatch, argv): monkeypatch.setattr(sys, "argv", ["hate_crack.py"] + argv) + # main()'s pre-dispatch potfile-recovery step shells out to the real hashcat + # binary, which is absent in CI. Stub it — these tests exercise dispatch + # routing and prompt suppression, not potfile recovery. + monkeypatch.setattr(hc_main, "_run_hashcat_show", lambda *a, **k: None) with pytest.raises(SystemExit) as excinfo: hc_main.main() return excinfo.value.code