Skip to content

Commit

Permalink
Merge 2a87e93 into 20deb1d
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jul 16, 2023
2 parents 20deb1d + 2a87e93 commit c9a8279
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ def test_submit_job_remote(self):
with self.assertRaises(NotImplementedError):
self.remote.submit_job(queue="remote", dependency_list=[])

def test_submit_command(self):
command = self.remote._adapter._submit_command(
queue="remote",
job_name="test",
working_directory="/home/localuser/projects/test",
cores=str(1),
memory_max=str(1),
run_time_max=str(1),
command_str="/bin/true",
)
self.assertEqual(
command,
'python -m pysqa --config_directory /u/share/pysqa/resources/queues/ --submit --queue remote --job_name test --working_directory /home/localuser/projects/test --cores 1 --memory 1 --run_time 1 --command "/bin/true" '
)

def test_get_queue_status_command(self):
command = self.remote._adapter._get_queue_status_command()
self.assertEqual(command, "python -m pysqa --config_directory /u/share/pysqa/resources/queues/ --status")

def test_convert_path_to_remote(self):
self.assertEqual(self.remote.convert_path_to_remote("/home/localuser/projects/test"), "/u/hpcuser/remote/test")

Expand Down

0 comments on commit c9a8279

Please sign in to comment.