toil.test.src.importExportFileTest

Module Contents

Classes

ImportExportFileTest

A common base class for Toil tests.

RestartingJob

Class represents a unit of work in toil.

class toil.test.src.importExportFileTest.ImportExportFileTest(methodName='runTest')[source]

Bases: toil.test.ToilTest

digraph inheritance43ca4d0985 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ImportExportFileTest" [URL="#toil.test.src.importExportFileTest.ImportExportFileTest",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"]; "ToilTest" -> "ImportExportFileTest" [arrowsize=0.5,style="setlinewidth(0.5)"]; "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)"]; }

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()[source]

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

create_file(content, executable=False)[source]
test_import_export_restart_true()[source]
test_import_export_restart_false()[source]
test_basic_import_export()[source]

Ensures that uploaded files preserve their file permissions when they are downloaded again. This function checks that an imported executable file maintains its executability after being exported.

class toil.test.src.importExportFileTest.RestartingJob(msg_portion_file_id, trigger_file_id, message_portion_2)[source]

Bases: toil.job.Job

digraph inheritance54d3a3f2e3 { 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."]; "RestartingJob" [URL="#toil.test.src.importExportFileTest.RestartingJob",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"]; "Job" -> "RestartingJob" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Class represents a unit of work in toil.

run(file_store)[source]

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().