Skip to content

Commit

Permalink
Add more commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed May 3, 2023
1 parent 6fb76db commit 800c2da
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/test_gent.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,35 @@ def execute_command(
command="echo hello"
), 1230)
os.remove("run_queue.sh")

def test_delete_job_no_output(self):
def execute_command(
commands,
working_directory=None,
split_output=True,
shell=False,
error_filename="pysqa.err",
):
pass

gent_tmp = QueueAdapter(
directory=os.path.join(self.path, "config/gent"),
execute_command=execute_command
)
self.assertIsNone(gent_tmp.delete_job(process_id=1))

def test_delete_job_with_output(self):
def execute_command(
commands,
working_directory=None,
split_output=True,
shell=False,
error_filename="pysqa.err",
):
return 0, 1

gent_tmp = QueueAdapter(
directory=os.path.join(self.path, "config/gent"),
execute_command=execute_command
)
self.assertEqual(gent_tmp.delete_job(process_id=1), 0)

0 comments on commit 800c2da

Please sign in to comment.