From a29924f330813d02d2e414f1d96cc26709475990 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 2 Dec 2021 08:45:58 -0500 Subject: [PATCH] Don't assume exception order from nursery --- tests/test_cancellation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 9f8ae0d..c346806 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -128,7 +128,11 @@ def test_multierror_fast_nursery(arb_addr, start_method, num_subactors, delay): if len(exceptions) == 2: # sometimes oddly now there's an embedded BrokenResourceError ? - exceptions = exceptions[1].exceptions + for exc in exceptions: + excs = getattr(exc, 'exceptions', None) + if excs: + exceptions = excs + break assert len(exceptions) == num_subactors