From 3fafbb5e34ed3f6f547bf1f184782b0f6967cf2f Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 15 Sep 2015 16:47:40 +0100 Subject: [PATCH 1/2] Fix more MissingToolException when running "./run_tests.sh -api" without "-with_framework_test_tools". --- test/api/test_workflow_extraction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/api/test_workflow_extraction.py b/test/api/test_workflow_extraction.py index 1307bc9f140..39cf87abba2 100644 --- a/test/api/test_workflow_extraction.py +++ b/test/api/test_workflow_extraction.py @@ -142,6 +142,7 @@ test_data: collection_step_state = loads( collection_step[ "tool_state" ] ) self.assertEquals( collection_step_state[ "collection_type" ], u"paired" ) + @skip_without_tool( "cat_collection" ) def test_subcollection_mapping( self ): jobs_summary = self._run_jobs(""" steps: @@ -180,6 +181,7 @@ test_data: collection_step_state = loads( collection_step[ "tool_state" ] ) self.assertEquals( collection_step_state[ "collection_type" ], u"list:paired" ) + @skip_without_tool( "collection_split_on_column" ) def test_extract_workflow_with_output_collections( self ): jobs_summary = self._run_jobs(""" steps: @@ -223,6 +225,7 @@ test_data: tool_ids=tool_ids, ) + @skip_without_tool( "collection_creates_pair" ) def test_extract_with_mapped_output_collections( self ): jobs_summary = self._run_jobs(""" steps: From 63d1715679fb714f4c8f5ae426106edf6988e7ab Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 15 Sep 2015 17:06:27 +0100 Subject: [PATCH 2/2] Fix API tests using collection_creates_pair tool. --- lib/galaxy/tools/__init__.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 263437fe72f..8c9ab61ffd5 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -295,15 +295,17 @@ class ToolOutput( ToolOutputBase ): class ToolOutputCollection( ToolOutputBase ): """ - Represents a HistoryDatasetCollectionAssociation of output datasets produced by a tool. + Represents a HistoryDatasetCollectionAssociation of output datasets produced + by a tool. + - + - - + + - + """ @@ -337,13 +339,10 @@ class ToolOutputCollection( ToolOutputBase ): if self.dynamic_structure: return [] - def to_part( ( element_identifier, output ) ): - return ToolOutputCollectionPart( self, element_identifier, output ) - # This line is probably not right - should verify structured_like # or have outputs and all outputs have name. if len( self.outputs ) > 1: - output_parts = map( to_part, self.outputs ) + output_parts = [ToolOutputCollectionPart(self, k, v) for k, v in self.outputs.iteritems()] else: # either must have specified structured_like or something worse if self.structure.structured_like: