toil.test.batchSystems.test_slurm
¶
Module Contents¶
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 |
- 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).
- class toil.test.batchSystems.test_slurm.SlurmTest(methodName='runTest')[source]¶
Bases:
digraph inheritance401ac6a62e { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "SlurmTest" [URL="#toil.test.batchSystems.test_slurm.SlurmTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class for unit-testing SlurmBatchSystem"]; "ToilTest" -> "SlurmTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TestCase" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A class whose instances are single test cases."]; "ToilTest" [URL="../../index.html#toil.test.ToilTest",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A common base class for Toil tests."]; "TestCase" -> "ToilTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }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.