test: gate_bus wait_payload honors should_cancel

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 18:43:43 +02:00
parent 1008612fb2
commit 3250aaa828
+6
View File
@@ -59,3 +59,9 @@ def test_wait_payload_cancel_flag_raises():
gb.GateBus.cancelled = True gb.GateBus.cancelled = True
with pytest.raises(gb.GateCancelled): with pytest.raises(gb.GateCancelled):
gb.GateBus.wait_payload("p") 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)