toil.test.provisioners.clusterTest

Module Contents

Classes

AbstractClusterTest

A common base class for Toil tests.

Attributes

log

toil.test.provisioners.clusterTest.log[source]
class toil.test.provisioners.clusterTest.AbstractClusterTest(methodName)[source]

Bases: toil.test.ToilTest

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.

Parameters:

methodName (str)

python()[source]

Return the full path to the venv Python on the leader.

Return type:

str

pip()[source]

Return the full path to the venv pip on the leader.

Return type:

str

destroyCluster()[source]

Destroy the cluster we built, if it exists.

Succeeds if the cluster does not currently exist.

Return type:

None

setUp()[source]

Set up for the test. Must be overridden to call this method and set self.jobStore.

Return type:

None

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

Return type:

None

sshUtil(command)[source]

Run the given command on the cluster. Raise subprocess.CalledProcessError if it fails.

Parameters:

command (List[str])

Return type:

None

rsync_util(from_file, to_file)[source]

Transfer a file to/from the cluster.

The cluster-side path should have a ‘:’ in front of it.

Parameters:
  • from_file (str)

  • to_file (str)

Return type:

None

createClusterUtil(args=None)[source]
Parameters:

args (Optional[List[str]])

Return type:

None

launchCluster()[source]
Return type:

None