diff --git a/tests/test_integration_pyiron_workflow.py b/tests/test_integration_pyiron_workflow.py index 37272703..64f0eed6 100644 --- a/tests/test_integration_pyiron_workflow.py +++ b/tests/test_integration_pyiron_workflow.py @@ -74,7 +74,7 @@ def slowly_returns_dynamic(dynamic_arg): return dynamic_arg dynamic_dynamic = slowly_returns_dynamic() - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) dynamic_object = does_nothing() fs = executor.submit(dynamic_dynamic.run, dynamic_object) @@ -104,7 +104,7 @@ def slowly_returns_42(): self.assertIsNone( dynamic_42.result, msg="Just a sanity check that the test is set up right" ) - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) fs = executor.submit(dynamic_42.run) fs.add_done_callback(dynamic_42.process_result) @@ -135,7 +135,7 @@ def returns_42(): dynamic_42.running, msg="Sanity check that the test starts in the expected condition", ) - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) fs = executor.submit(dynamic_42.run) fs.add_done_callback(dynamic_42.process_result) @@ -159,7 +159,7 @@ def raise_error(): raise RuntimeError re = raise_error() - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) fs = executor.submit(re.run) with self.assertRaises( @@ -189,7 +189,7 @@ def slowly_returns_dynamic(): return inside_variable dynamic_dynamic = slowly_returns_dynamic() - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) fs = executor.submit(dynamic_dynamic.run) self.assertIsInstance( @@ -218,7 +218,7 @@ def slow(): return fortytwo f = slow() - executor = Executor(block_allocation=True) + executor = Executor(block_allocation=True, max_workers=1) cloudpickle_register(ind=1) fs = executor.submit(f.run) self.assertEqual( diff --git a/tests/test_local_executor_future.py b/tests/test_local_executor_future.py index 13691579..7ab3f1cd 100644 --- a/tests/test_local_executor_future.py +++ b/tests/test_local_executor_future.py @@ -68,6 +68,7 @@ def submit(): # Executor only exists in this scope and can get garbage collected after # this function is exits future = InteractiveExecutor( + max_workers=1, executor_kwargs={}, spawner=MpiExecSpawner, ).submit(slow_callable) @@ -108,6 +109,7 @@ def run(self): self.running = True future = InteractiveExecutor( + max_workers=1, executor_kwargs={}, spawner=MpiExecSpawner, ).submit(self.return_42) diff --git a/tests/test_shell_interactive.py b/tests/test_shell_interactive.py index c304e65c..e211b559 100644 --- a/tests/test_shell_interactive.py +++ b/tests/test_shell_interactive.py @@ -105,6 +105,7 @@ def test_execute_single_task(self): def test_shell_interactive_executor(self): cloudpickle_register(ind=1) with Executor( + max_workers=1, init_function=init_process, block_allocation=True, ) as exe: