@@ -76,6 +76,7 @@ def slowly_returns_dynamic(dynamic_arg):
7676
7777 dynamic_dynamic = slowly_returns_dynamic ()
7878 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
79+ self .assertTrue (executor )
7980 cloudpickle_register (ind = 1 )
8081 dynamic_object = does_nothing ()
8182 fs = executor .submit (dynamic_dynamic .run , dynamic_object )
@@ -106,6 +107,7 @@ def slowly_returns_42():
106107 dynamic_42 .result , msg = "Just a sanity check that the test is set up right"
107108 )
108109 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
110+ self .assertTrue (executor )
109111 cloudpickle_register (ind = 1 )
110112 fs = executor .submit (dynamic_42 .run )
111113 fs .add_done_callback (dynamic_42 .process_result )
@@ -137,6 +139,7 @@ def returns_42():
137139 msg = "Sanity check that the test starts in the expected condition" ,
138140 )
139141 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
142+ self .assertTrue (executor )
140143 cloudpickle_register (ind = 1 )
141144 fs = executor .submit (dynamic_42 .run )
142145 fs .add_done_callback (dynamic_42 .process_result )
@@ -161,6 +164,7 @@ def raise_error():
161164
162165 re = raise_error ()
163166 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
167+ self .assertTrue (executor )
164168 cloudpickle_register (ind = 1 )
165169 fs = executor .submit (re .run )
166170 with self .assertRaises (
@@ -191,6 +195,7 @@ def slowly_returns_dynamic():
191195
192196 dynamic_dynamic = slowly_returns_dynamic ()
193197 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
198+ self .assertTrue (executor )
194199 cloudpickle_register (ind = 1 )
195200 fs = executor .submit (dynamic_dynamic .run )
196201 self .assertIsInstance (
@@ -220,6 +225,7 @@ def slow():
220225
221226 f = slow ()
222227 executor = SingleNodeExecutor (block_allocation = True , max_workers = 1 )
228+ self .assertTrue (executor )
223229 cloudpickle_register (ind = 1 )
224230 fs = executor .submit (f .run )
225231 self .assertEqual (
0 commit comments