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():
87
87
raise RuntimeError ("Could not stop ipcluster" )
88
88
89
89
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
-
99
90
def linear (x ):
100
91
return x
101
92
@@ -130,7 +121,11 @@ def test_ipyparallel_executor(ipyparallel_executor):
130
121
@pytest .mark .timeout (60 )
131
122
@pytest .mark .skipif (not with_distributed , reason = "dask.distributed is not installed" )
132
123
@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
+
134
127
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 ()
136
131
assert learner .npoints > 0
You can’t perform that action at this time.
0 commit comments