From 533457c64d9399dddff751a7a4ba9803f82418e8 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 15 Oct 2021 09:16:51 -0400 Subject: [PATCH] Handle nested multierror case on windows --- tests/test_cancellation.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 4271d8f..3c39956 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -1,5 +1,6 @@ """ Cancellation and error propagation + """ import os import signal @@ -377,10 +378,13 @@ async def test_nested_multierrors(loglevel, start_method): elif isinstance(subexc, trio.MultiError): for subsub in subexc.exceptions: - assert subsub.type in ( - tractor.RemoteActorError, + + if subsub in (tractor.RemoteActorError,): + subsub = subsub.type + + assert subsub in ( trio.Cancelled, - trio.MultiError + trio.MultiError, ) else: assert isinstance(subexc, tractor.RemoteActorError)