toil.test.docs.scriptsTest

Attributes

pkg_root

python

Classes

ToilTest

A common base class for Toil tests.

ToilDocumentationTest

Tests for scripts in the toil tutorials.

Functions

needs_cwl(test_item)

Use as a decorator before test classes or methods to only run them if CWLTool is installed

needs_docker(test_item)

Use as a decorator before test classes or methods to only run them if

Module Contents

toil.test.docs.scriptsTest.pkg_root
class toil.test.docs.scriptsTest.ToilTest(methodName='runTest')[source]

Bases: unittest.TestCase

A common base class for Toil tests.

Please have every test case directly or indirectly inherit this one.

When running tests you may optionally set the TOIL_TEST_TEMP environment variable to the path of a directory where you want temporary test files be placed. The directory will be created if it doesn’t exist. The path may be relative in which case it will be assumed to be relative to the project root. If TOIL_TEST_TEMP is not defined, temporary files and directories will be created in the system’s default location for such files and any temporary files or directories left over from tests will be removed automatically removed during tear down. Otherwise, left-over files will not be removed.

setup_method(method)[source]
Parameters:

method (Any)

Return type:

None

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

Return type:

None

classmethod tearDownClass()[source]

Hook method for deconstructing the class fixture after running all tests in the class.

Return type:

None

setUp()[source]

Hook method for setting up the test fixture before exercising it.

Return type:

None

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

Return type:

None

classmethod awsRegion()[source]

Pick an appropriate AWS region.

Use us-west-2 unless running on EC2, in which case use the region in which the instance is located

Return type:

str

toil.test.docs.scriptsTest.needs_cwl(test_item)[source]

Use as a decorator before test classes or methods to only run them if CWLTool is installed and configured.

Parameters:

test_item (MT)

Return type:

MT

toil.test.docs.scriptsTest.needs_docker(test_item)[source]

Use as a decorator before test classes or methods to only run them if docker is installed and docker-based tests are enabled.

Parameters:

test_item (MT)

Return type:

MT

toil.test.docs.scriptsTest.python = 'python3.9'
class toil.test.docs.scriptsTest.ToilDocumentationTest(methodName='runTest')[source]

Bases: toil.test.ToilTest

Tests for scripts in the toil tutorials.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

Return type:

None

checkExitCode(script, extra_args=[])[source]
Parameters:

extra_args (List[str])

checkExpectedOut(script, expectedOutput)[source]
checkExpectedPattern(script, expectedPattern)[source]
testStats()[source]
testDynamic()[source]
testEncapsulation()[source]
testEncapsulation2()[source]
testHelloworld()[source]
testInvokeworkflow()[source]
testInvokeworkflow2()[source]
testJobFunctions()[source]
testManaging()[source]
testManaging2()[source]
testMultiplejobs()[source]
testMultiplejobs2()[source]
testMultiplejobs3()[source]
testPromises2()[source]
testQuickstart()[source]
testRequirements()[source]
testArguments()[source]
testDocker()[source]
testPromises()[source]
testServices()[source]
testStaging()[source]