diff --git a/tests/test_discovery.py b/tests/test_discovery.py index 2b2996f..a3c6570 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -206,7 +206,8 @@ def test_subactors_unregister_on_cancel( """Verify that cancelling a nursery results in all subactors deregistering themselves with the arbiter. """ - with pytest.raises(KeyboardInterrupt): + # multi-error since there might be a channel breakage race? + with pytest.raises((KeyboardInterrupt, trio.MultiError)): trio.run( partial( spawn_and_check_registry, @@ -231,7 +232,7 @@ def test_subactors_unregister_on_cancel_remote_daemon( deregistering themselves with a **remote** (not in the local process tree) arbiter. """ - with pytest.raises(KeyboardInterrupt): + with pytest.raises((KeyboardInterrupt, trio.MultiError)): trio.run( partial( spawn_and_check_registry,