1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/7b7dd8f82126/ Changeset: 7b7dd8f82126 User: jmchilton Date: 2014-11-24 17:56:05+00:00 Summary: Tool API test for mixing batch and non-batch input datasets. Affected #: 1 file diff -r 6cc3b0c515bce43786031f750bf4bd98d7fc9fed -r 7b7dd8f82126b3c18e9d311305edae85adeea659 test/api/test_tools.py --- a/test/api/test_tools.py +++ b/test/api/test_tools.py @@ -255,26 +255,22 @@ assert sorted( map( lambda c: len( c.split( "\n" ) ), outputs_contents ) ) == [ 1, 2, 3 ] @skip_without_tool( "cat1" ) + def test_multirun_in_repeat_legacy( self ): + history_id, common_dataset, repeat_datasets = self._setup_repeat_multirun( ) + inputs = { + "input1": common_dataset, + 'queries_0|input2|__multirun__': repeat_datasets, + } + self._check_repeat_multirun( history_id, inputs ) + + @skip_without_tool( "cat1" ) def test_multirun_in_repeat( self ): - history_id = self.dataset_populator.new_history() - new_dataset1 = self.dataset_populator.new_dataset( history_id, content='123' ) - new_dataset2 = self.dataset_populator.new_dataset( history_id, content='456' ) - common_dataset = self.dataset_populator.new_dataset( history_id, content='Common' ) + history_id, common_dataset, repeat_datasets = self._setup_repeat_multirun( ) inputs = { - "input1": dataset_to_param( common_dataset ), - 'queries_0|input2|__multirun__': [ - dataset_to_param( new_dataset1 ), - dataset_to_param( new_dataset2 ), - ], + "input1": common_dataset, + 'queries_0|input2': { 'batch': True, 'values': repeat_datasets }, } - outputs = self._cat1_outputs( history_id, inputs=inputs ) - self.assertEquals( len( outputs ), 2 ) - output1 = outputs[ 0 ] - output2 = outputs[ 1 ] - output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output1 ) - output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output2 ) - self.assertEquals( output1_content.strip(), "Common\n123" ) - self.assertEquals( output2_content.strip(), "Common\n456" ) + self._check_repeat_multirun( history_id, inputs ) @skip_without_tool( "cat1" ) def test_multirun_on_multiple_inputs_legacy( self ): @@ -317,6 +313,27 @@ assert "123\n0ab" in outputs_contents assert "456\n789" in outputs_contents + def _setup_repeat_multirun( self ): + history_id = self.dataset_populator.new_history() + new_dataset1 = self.dataset_populator.new_dataset( history_id, content='123' ) + new_dataset2 = self.dataset_populator.new_dataset( history_id, content='456' ) + common_dataset = self.dataset_populator.new_dataset( history_id, content='Common' ) + return ( + history_id, + dataset_to_param( common_dataset ), + [ dataset_to_param( new_dataset1 ), dataset_to_param( new_dataset2 ) ] + ) + + def _check_repeat_multirun( self, history_id, inputs ): + outputs = self._cat1_outputs( history_id, inputs=inputs ) + self.assertEquals( len( outputs ), 2 ) + output1 = outputs[ 0 ] + output2 = outputs[ 1 ] + output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output1 ) + output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output2 ) + self.assertEquals( output1_content.strip(), "Common\n123" ) + self.assertEquals( output2_content.strip(), "Common\n456" ) + def _setup_two_multiruns( self ): history_id = self.dataset_populator.new_history() new_dataset1 = self.dataset_populator.new_dataset( history_id, content='123' ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.