toil.test.jobStores.jobStoreTest¶
Attributes¶
Classes¶
Hide abstract base class from unittest's test case loader |
|
A common base class for Toil tests. |
|
A common base class for Toil tests. |
|
A common base class for Toil tests. |
|
A common base class for Toil tests. |
|
A common base class for Toil tests. |
|
Simple HTTP request handler with GET and HEAD commands. |
Functions¶
|
|
Module Contents¶
- toil.test.jobStores.jobStoreTest.logger¶
- class toil.test.jobStores.jobStoreTest.AbstractJobStoreTest[source]¶
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
- class Test(methodName='runTest')[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.
- classmethod setUpClass()[source]¶
Hook method for setting up class fixture before running tests in the class.
- testJobCreation()[source]¶
Test creation of a job.
Does the job exist in the jobstore it is supposed to be in? Are its attributes what is expected?
- testConfigEquality()[source]¶
Ensure that the command line configurations are successfully loaded and stored.
In setUp() self.jobstore1 is created and initialized. In this test, after creating newJobStore, .resume() will look for a previously instantiated job store and load its config options. This is expected to be equal but not the same object.
- testJobLoadEquality()[source]¶
Tests that a job created via one JobStore instance can be loaded from another.
- testPersistantFilesToDelete()[source]¶
Make sure that updating a job persists filesToDelete.
The following demonstrates the job update pattern, where files to be deleted atomically with a job update are referenced in “filesToDelete” array, which is persisted to disk first. If things go wrong during the update, this list of files to delete is used to ensure that the updated job and the files are never both visible at the same time.
Tests the sharing of files.
Checks if text mode is compatible for shared file streams.
- externalStoreCache¶
- mpTestPartSize = 5242880¶
- testFileDeletion()[source]¶
Intended to cover the batch deletion of items in the AWSJobStore, but it doesn’t hurt running it on the other job stores.
- testMultipartUploads()[source]¶
This test is meant to cover multi-part uploads in the AWSJobStore but it doesn’t hurt running it against the other job stores as well.
- class toil.test.jobStores.jobStoreTest.AbstractEncryptedJobStoreTest[source]¶
- class Test(methodName='runTest')[source]¶
Bases:
AbstractJobStoreTest
A test of job stores that use encryption
- class toil.test.jobStores.jobStoreTest.FileJobStoreTest(methodName='runTest')[source]¶
Bases:
AbstractJobStoreTest
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.
- test_jobstore_init_preserves_symlink_path()[source]¶
Test that if we provide a fileJobStore with a symlink to a directory, it doesn’t de-reference it.
- class toil.test.jobStores.jobStoreTest.GoogleJobStoreTest(methodName='runTest')[source]¶
Bases:
AbstractJobStoreTest
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.
- projectID¶
- headers¶
- class toil.test.jobStores.jobStoreTest.AWSJobStoreTest(methodName='runTest')[source]¶
Bases:
AbstractJobStoreTest
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.
- class toil.test.jobStores.jobStoreTest.InvalidAWSJobStoreTest(methodName='runTest')[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.
- class toil.test.jobStores.jobStoreTest.EncryptedAWSJobStoreTest(methodName='runTest')[source]¶
Bases:
AWSJobStoreTest
,AbstractEncryptedJobStoreTest
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.
- class toil.test.jobStores.jobStoreTest.StubHttpRequestHandler(*args, directory=None, **kwargs)[source]¶
Bases:
http.server.SimpleHTTPRequestHandler
Simple HTTP request handler with GET and HEAD commands.
This serves files from the current directory and any of its subdirectories. The MIME type for files is determined by calling the .guess_type() method.
The GET and HEAD requests are identical except that the HEAD request omits the actual contents of the file.
- fileContents = 'A good programmer looks both ways before crossing a one-way street'¶