[hg] galaxy 2537: In tool tests, only add a file once if it is r...
details: http://www.bx.psu.edu/hg/galaxy/rev/11a2d159e280 changeset: 2537:11a2d159e280 user: Dan Blankenberg <dan@bx.psu.edu> date: Wed Aug 05 12:59:24 2009 -0400 description: In tool tests, only add a file once if it is required. 1 file(s) affected in this change: lib/galaxy/tools/test.py diffs (29 lines): diff -r 1ba58ed85a5f -r 11a2d159e280 lib/galaxy/tools/test.py --- a/lib/galaxy/tools/test.py Wed Aug 05 11:54:34 2009 -0400 +++ b/lib/galaxy/tools/test.py Wed Aug 05 12:59:24 2009 -0400 @@ -25,7 +25,7 @@ for input_name, input_value in self.tool.inputs.items(): if isinstance( input_value, grouping.Conditional ) or isinstance( input_value, grouping.Repeat ): self.__expand_grouping_for_data_input(name, value, extra, input_name, input_value) - elif isinstance( self.tool.inputs[name], parameters.DataToolParameter ): + elif isinstance( self.tool.inputs[name], parameters.DataToolParameter ) and ( value, extra ) not in self.required_files: self.required_files.append( ( value, extra ) ) except: pass self.inputs.append( ( name, value, extra ) ) @@ -37,7 +37,7 @@ if name != grouping_value.test_param.name: for case in grouping_value.cases: for case_input_name, case_input_value in case.inputs.items(): - if case_input_name == name and isinstance( case_input_value, basic.DataToolParameter ): + if case_input_name == name and isinstance( case_input_value, basic.DataToolParameter ) and ( value, extra ) not in self.required_files: self.required_files.append( ( value, extra ) ) return True elif isinstance( case_input_value, grouping.Conditional ): @@ -49,6 +49,6 @@ # with the same name ( "input2" ) is not yet supported in our test code ( the lat one added is the only # one used ). for input_name, input_value in grouping_value.inputs.items(): - if input_name == name and isinstance( input_value, basic.DataToolParameter ): + if input_name == name and isinstance( input_value, basic.DataToolParameter ) and ( value, extra ) not in self.required_files: self.required_files.append( ( value, extra ) ) return True
participants (1)
-
Greg Von Kuster