Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Dec 20, 2024
1 parent e010842 commit e93d616
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_executor_backend_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,16 @@ def test_output_files_cwd(self):
list(output),
[1, 2, 3],
)


class TestSLURMExecutor(unittest.TestCase):
def test_validate_max_workers(self):
os.environ["SLURM_NTASKS"] = "6"
os.environ["SLURM_CPUS_PER_TASK"] = "4"
with self.assertRaises(ValueError):
Executor(
max_workers=10,
resource_dict={"cores": 10, "threads_per_core": 10},
backend="slurm_allocation",
block_allocation=True,
)

0 comments on commit e93d616

Please sign in to comment.