Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Dec 17, 2024
1 parent 9d66651 commit f02ce72
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_executor_backend_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f02ce72

Please sign in to comment.