File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,6 @@ def ipyparallel_executor():
8787 raise RuntimeError ("Could not stop ipcluster" )
8888
8989
90- @pytest .fixture (scope = "session" )
91- def dask_executor ():
92- from distributed import Client
93-
94- client = Client (n_workers = 1 )
95- yield client
96- client .close ()
97-
98-
9990def linear (x ):
10091 return x
10192
@@ -130,7 +121,11 @@ def test_ipyparallel_executor(ipyparallel_executor):
130121@pytest .mark .timeout (60 )
131122@pytest .mark .skipif (not with_distributed , reason = "dask.distributed is not installed" )
132123@pytest .mark .skipif (sys .version_info [:2 ] == (3 , 8 ), reason = "XXX: seems to always fail" )
133- def test_distributed_executor (dask_executor ):
124+ def test_distributed_executor ():
125+ from distributed import Client
126+
134127 learner = Learner1D (linear , (- 1 , 1 ))
135- BlockingRunner (learner , trivial_goal , executor = dask_executor )
128+ client = Client (n_workers = 1 )
129+ BlockingRunner (learner , trivial_goal , executor = client )
130+ client .shutdown ()
136131 assert learner .npoints > 0
You can’t perform that action at this time.
0 commit comments