File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,17 @@ def pytest_collection_modifyitems(items):
47
47
48
48
49
49
@pytest .fixture (scope = "session" )
50
- def cluster (request ):
50
+ def cluster (request , ipython_dir ):
51
51
"""Setup IPython parallel cluster"""
52
52
setup ()
53
- request .addfinalizer (teardown )
53
+ try :
54
+ yield
55
+ finally :
56
+ teardown ()
54
57
55
58
56
59
@pytest .fixture (scope = 'session' )
57
- def ipython ():
60
+ def ipython (ipython_dir ):
58
61
config = default_config ()
59
62
config .TerminalInteractiveShell .simple_prompt = True
60
63
shell = TerminalInteractiveShell .instance (config = config )
@@ -81,7 +84,7 @@ def Context():
81
84
82
85
83
86
@pytest .fixture
84
- def Cluster (request , io_loop ):
87
+ def Cluster (request , ipython_dir , io_loop ):
85
88
"""Fixture for instantiating Clusters"""
86
89
87
90
def ClusterConstructor (** kwargs ):
Original file line number Diff line number Diff line change @@ -661,7 +661,12 @@ def test_wait_for_engines(self):
661
661
662
662
def test_signal_engines (self ):
663
663
view = self .client [:]
664
- for sig in (signal .SIGINT , 'SIGINT' ):
664
+ if sys .platform .startswith ("win" ):
665
+ signame = 'CTRL_C_EVENT'
666
+ else :
667
+ signame = 'SIGINT'
668
+ signum = getattr (signal , signame )
669
+ for sig in (signum , signame ):
665
670
ar = view .apply_async (time .sleep , 10 )
666
671
# FIXME: use status:busy to wait for tasks to start
667
672
time .sleep (1 )
You can’t perform that action at this time.
0 commit comments