diff --git a/tests/test_remote.py b/tests/test_remote.py index 0788fed9..54d30c6a 100644 --- a/tests/test_remote.py +++ b/tests/test_remote.py @@ -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")