test: gate_bus wait_payload honors should_cancel
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user