toil.test.batchSystems.test_slurm¶
Classes¶
Class that implements a minimal Batch System, needed to create a Worker (see below). |
|
Class for unit-testing SlurmBatchSystem |
Functions¶
|
The arguments passed to call_command when executing sacct are: |
|
The arguments passed to call_command when executing scontrol are: |
Fake that the sacct command fails by raising a CalledProcessErrorStderr |
Module Contents¶
- toil.test.batchSystems.test_slurm.call_sacct(args, **_)[source]¶
The arguments passed to call_command when executing sacct are: [‘sacct’, ‘-n’, ‘-j’, ‘<comma-separated list of job-ids>’, ‘–format’, ‘JobIDRaw,State,ExitCode’, ‘-P’, ‘-S’, ‘1970-01-01’] The multi-line output is something like:
1234|COMPLETED|0:0 1234.batch|COMPLETED|0:0 1235|PENDING|0:0 1236|FAILED|0:2 1236.extern|COMPLETED|0:0
- Return type:
- toil.test.batchSystems.test_slurm.call_scontrol(args, **_)[source]¶
The arguments passed to call_command when executing scontrol are:
['scontrol', 'show', 'job']
or['scontrol', 'show', 'job', '<job-id>']
- Return type:
- toil.test.batchSystems.test_slurm.call_sacct_raises(*_)[source]¶
Fake that the sacct command fails by raising a CalledProcessErrorStderr
- class toil.test.batchSystems.test_slurm.FakeBatchSystem[source]¶
Class that implements a minimal Batch System, needed to create a Worker (see below).
- config¶
- class toil.test.batchSystems.test_slurm.SlurmTest(methodName='runTest')[source]¶
Bases:
toil.test.ToilTest
Class for unit-testing SlurmBatchSystem
- test_getJobDetailsFromScontrol_one_not_exists()[source]¶
Asking for the job details of a single job that scontrol doesn’t know about should raise an exception.
- test_getJobExitCode_sacct_raises_job_exists()[source]¶
This test forces the use of scontrol to get job information, by letting sacct raise an exception.
- test_getJobExitCode_sacct_raises_job_not_exists()[source]¶
This test forces the use of scontrol to get job information, by letting sacct raise an exception. Next, scontrol should also raise because it doesn’t know the job.