forked from goodboy/tractor
1
0
Fork 0

Compare commits

...

1 Commits

Author SHA1 Message Date
Tyler Goodlet cf56d8f581 Accept multierr on racy teardown discovery tests 2021-12-02 15:29:04 -05:00
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,