diff --git a/tests/test_executor_backend_flux.py b/tests/test_executor_backend_flux.py index 8ab11569..ebedb998 100644 --- a/tests/test_executor_backend_flux.py +++ b/tests/test_executor_backend_flux.py @@ -100,6 +100,28 @@ def test_single_task(self): [[(1, 2, 0), (1, 2, 1)], [(2, 2, 0), (2, 2, 1)], [(3, 2, 0), (3, 2, 1)]], ) + def test_output_files(self): + file_stdout = os.path.join(os.path.dirname(__file__), "flux.out") + file_stderr = os.path.join(os.path.dirname(__file__), "flux.err") + with Executor( + max_cores=2, + resource_dict={"cores": 2}, + flux_executor=self.executor, + backend="flux_allocation", + block_allocation=True, + flux_executor_pmi_mode=pmi, + flux_log_files=True, + ) as p: + output = p.map(mpi_funct, [1, 2, 3]) + self.assertEqual( + list(output), + [[(1, 2, 0), (1, 2, 1)], [(2, 2, 0), (2, 2, 1)], [(3, 2, 0), (3, 2, 1)]], + ) + self.assertTrue(os.path.exists(file_stdout)) + self.assertTrue(os.path.exists(file_stderr)) + os.remove(file_stdout) + os.remove(file_stderr) + def test_internal_memory(self): with Executor( max_cores=1,