toil.test.src.promisedRequirementTest¶
Attributes¶
Classes¶
Hide abstract base class from unittest's test case loader. |
|
Tests against the SingleMachine batch system |
|
Tests against the Mesos batch system |
Functions¶
|
Returns the max number of concurrent tasks when using a PromisedRequirement instance |
|
|
|
Logs the job's disk usage to master and sleeps for specified amount of time. |
Module Contents¶
Hide abstract base class from unittest’s test case loader.
http://stackoverflow.com/questions/1323455/python-unit-test-with-base-and-sub-class#answer-25695512
Bases:
toil.test.batchSystems.batchSystemTest.hidden.AbstractBatchSystemJobTest
An abstract base class for testing Toil workflows with promised requirements.
Asserts that promised core resources are allocated properly using a dynamic Toil workflow
Asserts that promised core resources are allocated properly using a static DAG
Configures options for Toil workflow and makes job store. :param str tempDir: path to test directory :return: Toil options object
Returns path to a counter file :param str tempDir: path to test directory :return: path to counter file
Check whether FileID objects are being pickled properly when used as return values of functions. Then ensure that lambdas of promised FileID objects can be used to describe the requirements of a subsequent job. This type of operation will be used commonly in Toil scripts. :return: None
Checks for a race condition when using promised requirements and child job functions.
- toil.test.src.promisedRequirementTest.maxConcurrency(job, cpuCount, filename, coresPerJob)[source]¶
Returns the max number of concurrent tasks when using a PromisedRequirement instance to allocate the number of cores per job.
- toil.test.src.promisedRequirementTest.logDiskUsage(job, funcName, sleep=0)[source]¶
Logs the job’s disk usage to master and sleeps for specified amount of time.
- Returns:
job function’s disk usage
- class toil.test.src.promisedRequirementTest.SingleMachinePromisedRequirementsTest(methodName='runTest')[source]¶
Bases:
hidden
Tests against the SingleMachine batch system
- class toil.test.src.promisedRequirementTest.MesosPromisedRequirementsTest(methodName='runTest')[source]¶
Bases:
hidden
,toil.batchSystems.mesos.test.MesosTestSupport
Tests against the Mesos batch system
- getOptions(tempDir, caching=True)[source]¶
Configures options for Toil workflow and makes job store. :param str tempDir: path to test directory :return: Toil options object