Accept multierr on racy teardown discovery tests

acked_backup
Tyler Goodlet 2021-12-02 11:10:18 -05:00
parent 08e9593306
commit cf56d8f581
1 changed files with 3 additions and 2 deletions

View File

@ -206,7 +206,8 @@ def test_subactors_unregister_on_cancel(
"""Verify that cancelling a nursery results in all subactors """Verify that cancelling a nursery results in all subactors
deregistering themselves with the arbiter. 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( trio.run(
partial( partial(
spawn_and_check_registry, 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 deregistering themselves with a **remote** (not in the local process
tree) arbiter. tree) arbiter.
""" """
with pytest.raises(KeyboardInterrupt): with pytest.raises((KeyboardInterrupt, trio.MultiError)):
trio.run( trio.run(
partial( partial(
spawn_and_check_registry, spawn_and_check_registry,