File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,14 +47,17 @@ def pytest_collection_modifyitems(items):
4747
4848
4949@pytest .fixture (scope = "session" )
50- def cluster (request ):
50+ def cluster (request , ipython_dir ):
5151 """Setup IPython parallel cluster"""
5252 setup ()
53- request .addfinalizer (teardown )
53+ try :
54+ yield
55+ finally :
56+ teardown ()
5457
5558
5659@pytest .fixture (scope = 'session' )
57- def ipython ():
60+ def ipython (ipython_dir ):
5861 config = default_config ()
5962 config .TerminalInteractiveShell .simple_prompt = True
6063 shell = TerminalInteractiveShell .instance (config = config )
@@ -81,7 +84,7 @@ def Context():
8184
8285
8386@pytest .fixture
84- def Cluster (request , io_loop ):
87+ def Cluster (request , ipython_dir , io_loop ):
8588 """Fixture for instantiating Clusters"""
8689
8790 def ClusterConstructor (** kwargs ):
Original file line number Diff line number Diff line change @@ -661,7 +661,12 @@ def test_wait_for_engines(self):
661661
662662 def test_signal_engines (self ):
663663 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 ):
665670 ar = view .apply_async (time .sleep , 10 )
666671 # FIXME: use status:busy to wait for tasks to start
667672 time .sleep (1 )
You can’t perform that action at this time.
0 commit comments