From 451170bb637b51d4688770e3949cd00516065de0 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 13 Aug 2020 13:26:08 -0400 Subject: [PATCH] Pass explicit kwargs to new discovery test funcs --- tests/test_discovery.py | 44 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/tests/test_discovery.py b/tests/test_discovery.py index f180b60..52a1dc8 100644 --- a/tests/test_discovery.py +++ b/tests/test_discovery.py @@ -196,11 +196,13 @@ def test_subactors_unregister_on_cancel( """ with pytest.raises(KeyboardInterrupt): tractor.run( - spawn_and_check_registry, - arb_addr, - use_signal, - False, # remote arbiter - with_streaming, + partial( + spawn_and_check_registry, + arb_addr, + use_signal, + remote_arbiter=False, + with_streaming=with_streaming, + ), arbiter_addr=arb_addr ) @@ -220,11 +222,13 @@ def test_subactors_unregister_on_cancel_remote_daemon( """ with pytest.raises(KeyboardInterrupt): tractor.run( - spawn_and_check_registry, - arb_addr, - use_signal, - True, # remote arbiter - with_streaming, + partial( + spawn_and_check_registry, + arb_addr, + use_signal, + remote_arbiter=True, + with_streaming=with_streaming, + ), # XXX: required to use remote daemon! arbiter_addr=arb_addr ) @@ -300,10 +304,12 @@ def test_close_channel_explicit( """ with pytest.raises(KeyboardInterrupt): tractor.run( - close_chans_before_nursery, - arb_addr, - use_signal, - False, + partial( + close_chans_before_nursery, + arb_addr, + use_signal, + remote_arbiter=False, + ), # XXX: required to use remote daemon! arbiter_addr=arb_addr ) @@ -322,10 +328,12 @@ def test_close_channel_explicit_remote_arbiter( """ with pytest.raises(KeyboardInterrupt): tractor.run( - close_chans_before_nursery, - arb_addr, - use_signal, - True, + partial( + close_chans_before_nursery, + arb_addr, + use_signal, + remote_arbiter=True, + ), # XXX: required to use remote daemon! arbiter_addr=arb_addr )