Fix cancelled type handling

fix_win_ci_again
Tyler Goodlet 2020-07-27 11:14:21 -04:00
parent ed96672136
commit e8a38e4d15
1 changed files with 9 additions and 9 deletions

View File

@ -331,16 +331,16 @@ async def test_nested_multierrors(loglevel, start_method):
# windows is often too slow and cancellation seems
# to happen before an actor is spawned
if subexc is trio.Cancelled:
if isinstance(subexc, trio.Cancelled):
continue
# on windows it seems we can't exactly be sure wtf
# will happen..
assert subexc.type in (
tractor.RemoteActorError,
trio.Cancelled,
trio.MultiError
)
else:
# on windows it seems we can't exactly be sure wtf
# will happen..
assert subexc.type in (
tractor.RemoteActorError,
trio.Cancelled,
trio.MultiError
)
else:
assert isinstance(subexc, tractor.RemoteActorError)