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)¶
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)¶
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(*_)¶
Fake that the sacct command fails by raising a CalledProcessErrorStderr
- class toil.test.batchSystems.test_slurm.FakeBatchSystem¶
Class that implements a minimal Batch System, needed to create a Worker (see below).
- getWaitDuration()¶
- class toil.test.batchSystems.test_slurm.SlurmTest(methodName='runTest')¶
Bases:
toil.test.ToilTest
Class for unit-testing SlurmBatchSystem
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- test_getJobDetailsFromSacct_one_exists()¶
- test_getJobDetailsFromSacct_one_not_exists()¶
- test_getJobDetailsFromSacct_many_all_exist()¶
- test_getJobDetailsFromSacct_many_some_exist()¶
- test_getJobDetailsFromSacct_many_none_exist()¶
- test_getJobDetailsFromScontrol_one_exists()¶
- test_getJobDetailsFromScontrol_one_not_exists()¶
Asking for the job details of a single job that scontrol doesn’t know about should raise an exception.
- test_getJobDetailsFromScontrol_many_all_exist()¶
- test_getJobDetailsFromScontrol_many_some_exist()¶
- test_getJobDetailsFromScontrol_many_none_exist()¶
- test_getJobExitCode_job_exists()¶
- test_getJobExitCode_job_not_exists()¶
- test_getJobExitCode_sacct_raises_job_exists()¶
This test forces the use of scontrol to get job information, by letting sacct raise an exception.
- test_getJobExitCode_sacct_raises_job_not_exists()¶
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.
- test_coalesce_job_exit_codes_one_exists()¶
- test_coalesce_job_exit_codes_one_not_exists()¶
- test_coalesce_job_exit_codes_many_all_exist()¶
- test_coalesce_job_exit_codes_some_exists()¶
- test_coalesce_job_exit_codes_sacct_raises_job_exists()¶
This test forces the use of scontrol to get job information, by letting sacct raise an exception.
- test_coalesce_job_exit_codes_sacct_raises_job_not_exists()¶
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.