def test_command(self): """ Test the get_pipeline_script_command """ os.chdir(PATH) buildout = BUILDOUT.copy() accession = buildout['TestRun'] pipeline = BUILDOUT['pipeline'].copy() options = OPTIONS.copy() options['experiment_id'] = os.path.split(options['location'])[-1] command = get_pipeline_script_command(accession, pipeline, options) self.failUnless(command.split(' ') == SCRIPT, command.split(' '))
def test_cluster_given(self): """ Test the get_pipeline_script_command method with cluster """ os.chdir(PATH) buildout = BUILDOUT.copy() accession = buildout['TestRun'] pipeline = BUILDOUT['pipeline'].copy() pipeline['CLUSTER'] = 'dummy' options = OPTIONS.copy() options['experiment_id'] = os.path.split(options['location'])[-1] command = get_pipeline_script_command(accession, pipeline, options) self.failUnless(" -cluster dummy " in command)
def test_more_options(self): """ Test the get_pipeline_script_command method with replicate and other options. """ os.chdir(PATH) buildout = BUILDOUT.copy() accession = buildout['TestRun'] accession['replicate'] = '1' pipeline = BUILDOUT['pipeline'].copy() pipeline['HOST'] = 'dummyhost' pipeline['PREPROCESS'] = 'dummypreprocess' pipeline['PREPROCESS_TRIM_LENGTH'] = '1' options = OPTIONS.copy() options['experiment_id'] = os.path.split(options['location'])[-1] options['description'] = 'dummydescription' command = get_pipeline_script_command(accession, pipeline, options) self.failUnless(" -bioreplicate 1 " in command) self.failUnless(" -host dummyhost " in command) self.failUnless(" -run_description 'dummydescription' " in command) self.failUnless(" -preprocess 'dummypreprocess' " in command) self.failUnless(" -preprocess_trim_length 1" in command)