toil.test.utils.utilsTest¶
Attributes¶
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¶
Module Contents¶
- toil.test.utils.utilsTest.pkg_root = b'.'¶
- toil.test.utils.utilsTest.logger¶
- class toil.test.utils.utilsTest.UtilsTest(methodName='runTest')¶
Bases:
toil.test.ToilTest
Tests the utilities that toil ships with, e.g. stats and status, in conjunction with restart functionality.
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- property toilMain¶
- property cleanCommand¶
- property statsCommand¶
- 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, process=None, 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 successful 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:
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()
.