Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed May 17, 2024
1 parent 981bece commit 1611cab
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 21 deletions.
4 changes: 2 additions & 2 deletions tests/test_gent.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("gent"):
self.assertEqual(
self.gent._adapter._list_command_to_be_executed(None, "here"),
self.gent._adapter._list_command_to_be_executed("here"),
["sbatch", "--parsable", "here"],
)
with self.subTest("gent with dependency"):
self.assertRaises(
NotImplementedError,
TypeError,
self.gent._adapter._list_command_to_be_executed,
[],
"here",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_lsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("lsf"):
self.assertEqual(
self.lsf._adapter._list_command_to_be_executed(None, "here"),
self.lsf._adapter._list_command_to_be_executed("here"),
["bsub", "here"],
)
with self.subTest("lsf with dependency"):
self.assertRaises(
NotImplementedError,
TypeError,
self.lsf._adapter._list_command_to_be_executed,
[],
"here",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_moab.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("moab with dependency"):
self.assertRaises(
NotImplementedError,
TypeError,
self.moab._adapter._list_command_to_be_executed,
[],
"here",
)
with self.subTest("moab"):
self.assertEqual(
self.moab._adapter._list_command_to_be_executed(None, "here"),
self.moab._adapter._list_command_to_be_executed("here"),
["msub", "here"],
)
4 changes: 2 additions & 2 deletions tests/test_sge.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("sge"):
self.assertEqual(
self.sge._adapter._list_command_to_be_executed(None, "here"),
self.sge._adapter._list_command_to_be_executed("here"),
["qsub", "-terse", "here"],
)
with self.subTest("sge with dependency"):
self.assertRaises(
NotImplementedError,
TypeError,
self.sge._adapter._list_command_to_be_executed,
[],
"here",
Expand Down
12 changes: 1 addition & 11 deletions tests/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,9 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("slurm"):
self.assertEqual(
self.slurm._adapter._list_command_to_be_executed(None, "here"),
self.slurm._adapter._list_command_to_be_executed("here"),
["sbatch", "--parsable", "here"],
)
with self.subTest("slurm with one dependency"):
self.assertEqual(
self.slurm._adapter._list_command_to_be_executed(["2"], "here"),
["sbatch", "--parsable", "--dependency=afterok:2", "here"],
)
with self.subTest("slurm with two dependencies"):
self.assertEqual(
self.slurm._adapter._list_command_to_be_executed(["2", "34"], "here"),
["sbatch", "--parsable", "--dependency=afterok:2,34", "here"],
)

def test_convert_queue_status_slurm(self):
with open(os.path.join(self.path, "config/slurm", "squeue_output"), "r") as f:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_torque.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ def test_interfaces(self):
def test__list_command_to_be_executed(self):
with self.subTest("torque"):
self.assertEqual(
self.torque._adapter._list_command_to_be_executed(None, "here"),
self.torque._adapter._list_command_to_be_executed("here"),
["qsub", "here"],
)
with self.subTest("torque with dependency"):
self.assertRaises(
NotImplementedError,
TypeError,
self.torque._adapter._list_command_to_be_executed,
[],
"here",
Expand Down

0 comments on commit 1611cab

Please sign in to comment.