details: http://www.bx.psu.edu/hg/galaxy/rev/821b6cbbee1c changeset: 3498:821b6cbbee1c user: Dan Blankenberg <dan@bx.psu.edu> date: Tue Mar 09 14:28:33 2010 -0500 description: Allow better testing of tool outputs with an unknown number of dynamically created outputs. diffstat: test/functional/test_toolbox.py | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diffs (28 lines): diff -r a719c6971613 -r 821b6cbbee1c test/functional/test_toolbox.py --- a/test/functional/test_toolbox.py Tue Mar 09 14:13:05 2010 -0500 +++ b/test/functional/test_toolbox.py Tue Mar 09 14:28:33 2010 -0500 @@ -53,6 +53,11 @@ if isinstance( input_value, grouping.Repeat ): repeat_name = input_name break + #check if we need to verify number of outputs created dynamically by tool + if testdef.tool.force_history_refresh: + job_finish_by_output_count = len( self.get_history_as_data_list() ) + else: + job_finish_by_output_count = False # Do the first page page_inputs = self.__expand_grouping(testdef.tool.inputs_by_page[0], all_inputs) # Run the tool @@ -65,7 +70,11 @@ print "page_inputs (%i)" % i, page_inputs # Check the results ( handles single or multiple tool outputs ). Make sure to pass the correct hid. # The output datasets from the tool should be in the same order as the testdef.outputs. - data_list = self.get_history_as_data_list() + data_list = None + while data_list is None: + data_list = self.get_history_as_data_list() + if job_finish_by_output_count and len( testdef.outputs ) > ( len( data_list ) - job_finish_by_output_count ): + data_list = None self.assertTrue( data_list ) elem_index = 0 - len( testdef.outputs ) for output_tuple in testdef.outputs: