Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
EOSC
SlurmExecutorPlugin
Commits
c683aa88
Commit
c683aa88
authored
Sep 17, 2019
by
Mattia Mancini
Browse files
add test
parent
5b3fe252
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_slurm_cli.py
View file @
c683aa88
...
...
@@ -44,6 +44,13 @@ class TestSlurmControl(unittest.TestCase):
with
self
.
assertRaises
(
slurm_control
.
SlurmCallError
):
_
=
slurm_control
.
get_jobs_status
()
@
patch
(
'slurm_cli.slurm_control.run_process'
)
def
test_get_job_statuses_job_id_list_missing
(
self
,
call_mock
):
output_string
=
'1;test_job;CD;COMPLETED;None
\n
2;test_job;F;FAILED;error 1
\n
'
call_mock
.
return_value
=
get_mocked_call_output
(
0
,
output_string
,
'stuff'
)
_
=
slurm_control
.
get_jobs_status
([
'1'
,
'2'
])
self
.
assertIn
(
'1,2'
,
call_mock
.
call_args
[
0
][
0
])
if
__name__
==
'__main__'
:
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
format
=
'%(asctime)s-%(name)s-%(levelname)s %(message)s'
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment