|
ensembl-hive-python3
2.8.1
|
Functions | |
| def | testRunnable (testcase, runnableClass, inputParameters, refEvents, config=None) |
| Method to test a Runnable. More... | |
Variables | |
| WarningEvent = collections.namedtuple('WarningEvent', ['message', 'is_error']) | |
| DataflowEvent = collections.namedtuple('DataflowEvent', ['output_ids', 'branch_name_or_code']) | |
| CompleteEarlyEvent = collections.namedtuple('CompleteEarlyEvent', ['message']) | |
| FailureEvent = collections.namedtuple('FailureEvent', ['exception', 'args']) | |
| __config | |
| Helper class to provide a test-enabled version of the requested Runnable. More... | |
| __refEvents | |
| _BaseRunnable__params | |
| input_job | |
| debug | |
| __created_worker_temp_directory | |
| Run the job's life cycle. More... | |
| def eHive.tests.testRunnable | ( | testcase, | |
| runnableClass, | |||
| inputParameters, | |||
| refEvents, | |||
config = None |
|||
| ) |
Method to test a Runnable.
| testcase | instance of unittest.TestCase, which is used to do the actual tests. |
| runnableClass | Runnable being tested. Can be a string of the actual type. |
| inputParameters | dictionary of input parameters. Will override the Runnable's param_defaults() dictionary. |
| refEvents | list of "events" the Runnable is expected to raise (in the right order). Accepted events are
|
| config | extra configuration options, given as a dictionary. Accepted keys are
|
Definition at line 71 of file tests.py.
Here is the call graph for this function:
|
private |
|
private |
Run the job's life cycle.
Run the method (one of "fetch_input", "run", "write_output", etc) if defined in the Runnable.
This must match BaseRunnable.__job_life_cycle
Capture and check the Runnable's own exceptions whilst letting the testcase's exceptions pass through
Extra tests once the job has ended Provide a temporary directory for the duration of the test. This functionality was handled by the Perl side (via GuestProcess but has to be reimplemented.
| eHive.tests.CompleteEarlyEvent = collections.namedtuple('CompleteEarlyEvent', ['message']) |
| eHive.tests.DataflowEvent = collections.namedtuple('DataflowEvent', ['output_ids', 'branch_name_or_code']) |
| eHive.tests.FailureEvent = collections.namedtuple('FailureEvent', ['exception', 'args']) |