toil.test.utils.utilsTest
¶
Module Contents¶
Classes¶
Tests the utilities that toil ships with, e.g. stats and status, in conjunction with restart |
|
Runs child job with same resources as self in an attempt to chain the jobs on the same worker |
Functions¶
Attributes¶
- toil.test.utils.utilsTest.pkg_root¶
- toil.test.utils.utilsTest.logger¶
- class toil.test.utils.utilsTest.UtilsTest(methodName='runTest')¶
Bases:
digraph inheritanceb2a94232f6 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "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)"]; "UtilsTest" [URL="#toil.test.utils.utilsTest.UtilsTest",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="Tests the utilities that toil ships with, e.g. stats and status, in conjunction with restart"]; "ToilTest" -> "UtilsTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; }toil.test.ToilTest
Tests the utilities that toil ships with, e.g. stats and status, in conjunction with restart functionality.
- property toilMain¶
- property cleanCommand¶
- property statsCommand¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- statusCommand(failIfNotComplete=False)¶
- test_config_functionality()¶
Ensure that creating and reading back the config file works
- testAWSProvisionerUtils()¶
Runs a number of the cluster utilities in sequence.
Launches a cluster with custom tags. Verifies the tags exist. ssh’s into the cluster. Does some weird string comparisons. Makes certain that TOIL_WORKDIR is set as expected in the ssh’ed cluster. Rsyncs a file and verifies it exists on the leader. Destroys the cluster.
- Returns:
- testUtilsSort()¶
Tests the status and stats commands of the toil command line utility using the sort example with the –restart flag.
- testUtilsStatsSort()¶
Tests the stats commands on a complete run of the stats test.
- testUnicodeSupport()¶
- testMultipleJobsPerWorkerStats()¶
Tests case where multiple jobs are run on 1 worker to ensure that all jobs report back their data
- check_status(status, status_fn, seconds=20)¶
- testGetPIDStatus()¶
Test that ToilStatus.getPIDStatus() behaves as expected.
- testGetStatusFailedToilWF()¶
Test that ToilStatus.getStatus() behaves as expected with a failing Toil workflow. While this workflow could be called by importing and evoking its main function, doing so would remove the opportunity to test the ‘RUNNING’ functionality of getStatus().
- testGetStatusFailedCWLWF()¶
Test that ToilStatus.getStatus() behaves as expected with a failing CWL workflow.
- testGetStatusSuccessfulCWLWF()¶
Test that ToilStatus.getStatus() behaves as expected with a successful CWL workflow.
- testPrintJobLog(mock_print)¶
Test that ToilStatus.printJobLog() reads the log from a failed command without error.
- testRestartAttribute()¶
Test that the job store is only destroyed when we observe a succcessful workflow run. The following simulates a failing workflow that attempts to resume without restart(). In this case, the job store should not be destroyed until restart() is called.
- toil.test.utils.utilsTest.printUnicodeCharacter()¶
- class toil.test.utils.utilsTest.RunTwoJobsPerWorker¶
Bases:
digraph inheritance50faa46ed7 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Job" [URL="../../../job/index.html#toil.job.Job",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 represents a unit of work in toil."]; "RunTwoJobsPerWorker" [URL="#toil.test.utils.utilsTest.RunTwoJobsPerWorker",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="Runs child job with same resources as self in an attempt to chain the jobs on the same worker"]; "Job" -> "RunTwoJobsPerWorker" [arrowsize=0.5,style="setlinewidth(0.5)"]; }toil.job.Job
Runs child job with same resources as self in an attempt to chain the jobs on the same worker
- run(fileStore)¶
Override this function to perform work and dynamically create successor jobs.
- Parameters:
fileStore – Used to create local and globally sharable temporary files and to send log messages to the leader process.
- Returns:
The return value of the function can be passed to other jobs by means of
toil.job.Job.rv()
.