Try to handle variable windows errors
parent
9d83ef82b2
commit
7ee121aeaf
|
@ -365,7 +365,8 @@ async def test_nested_multierrors(loglevel, start_method):
|
|||
# to happen before an actor is spawned
|
||||
if isinstance(subexc, trio.Cancelled):
|
||||
continue
|
||||
else:
|
||||
|
||||
elif isinstance(subexc, tractor.RemoteActorError):
|
||||
# on windows it seems we can't exactly be sure wtf
|
||||
# will happen..
|
||||
assert subexc.type in (
|
||||
|
@ -373,6 +374,14 @@ async def test_nested_multierrors(loglevel, start_method):
|
|||
trio.Cancelled,
|
||||
trio.MultiError
|
||||
)
|
||||
|
||||
elif isinstance(subexc, trio.MultiError):
|
||||
for subsub in subexc.exceptions:
|
||||
assert subsub.type in (
|
||||
tractor.RemoteActorError,
|
||||
trio.Cancelled,
|
||||
trio.MultiError
|
||||
)
|
||||
else:
|
||||
assert isinstance(subexc, tractor.RemoteActorError)
|
||||
|
||||
|
@ -448,6 +457,7 @@ def test_cancel_via_SIGINT_other_task(
|
|||
with pytest.raises(KeyboardInterrupt):
|
||||
trio.run(main)
|
||||
|
||||
|
||||
async def spin_for(period=3):
|
||||
"Sync sleep."
|
||||
time.sleep(period)
|
||||
|
|
Loading…
Reference in New Issue