From e8a38e4d15cc3868496b8880f5b87811f74d929d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 27 Jul 2020 11:14:21 -0400 Subject: [PATCH 1/2] Fix cancelled type handling --- tests/test_cancellation.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 6af078c..06aef92 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -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) From 5715fd45990d8a98d0de11941ec4d53dae646a47 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 27 Jul 2020 12:20:46 -0400 Subject: [PATCH 2/2] Skip streaming tests --- tests/test_streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_streaming.py b/tests/test_streaming.py index f49cbf4..6d278b8 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -213,7 +213,7 @@ def time_quad_ex(arb_addr): def test_a_quadruple_example(time_quad_ex, travis, spawn_backend): """This also serves as a kind of "we'd like to be this fast test".""" - if travis and spawn_backend == 'mp' and not platform.system() == 'Windows': + if travis and spawn_backend == 'mp' and (platform.system() != 'Windows'): # no idea, but the travis, mp, linux runs are flaking out here often pytest.skip("Test is too flaky on mp in CI") @@ -233,7 +233,7 @@ def test_not_fast_enough_quad( """Verify we can cancel midway through the quad example and all actors cancel gracefully. """ - if travis and spawn_backend == 'mp' and not platform.system() == 'Windows': + if travis and spawn_backend == 'mp' and (platform.system() != 'Windows'): # no idea, but the travis, mp, linux runs are flaking out here often pytest.skip("Test is too flaky on mp in CI")