From 3250aaa8284d5be7a9371eacefb3b826a1928c69 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 21 Jun 2026 18:43:43 +0200 Subject: [PATCH] test: gate_bus wait_payload honors should_cancel Co-Authored-By: Claude Opus 4.8 --- tests/test_gate_bus.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_gate_bus.py b/tests/test_gate_bus.py index 0cd9962..46376a6 100644 --- a/tests/test_gate_bus.py +++ b/tests/test_gate_bus.py @@ -59,3 +59,9 @@ def test_wait_payload_cancel_flag_raises(): gb.GateBus.cancelled = True with pytest.raises(gb.GateCancelled): gb.GateBus.wait_payload("p") + +def test_wait_payload_should_cancel_raises(): + import pytest + gb.GateBus.arm("p") + with pytest.raises(gb.GateCancelled): + gb.GateBus.wait_payload("p", should_cancel=lambda: True)