From 3e74cc6f113baad63e0dbd03ef6d2c43abfc7d89 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 19 Nov 2018 16:53:21 -0500 Subject: [PATCH] Verify nested boxed errors --- tests/test_cancellation.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 0dd33c2..98dd8ee 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -162,11 +162,14 @@ async def test_some_cancels_all(num_actors_and_errs): # ``MultiError`` containing an ``AssertionError` except first_err as err: - if isinstance(err, trio.MultiError): + if isinstance(err, tractor.MultiError): assert len(err.exceptions) == num for exc in err.exceptions: - assert exc.type == err_type - else: + if isinstance(exc, tractor.RemoteActorError): + assert exc.type == err_type + else: + assert isinstance(exc, trio.Cancelled) + elif isinstance(err, tractor.RemoteActorError): assert err.type == err_type assert n.cancelled is True