details: http://www.bx.psu.edu/hg/galaxy/rev/3190f7d6b572 changeset: 2435:3190f7d6b572 user: Dan Blankenberg <dan@bx.psu.edu> date: Mon Jun 08 16:52:55 2009 -0400 description: Update the way the testing framework decides whether a refresh_on_change is required. 1 file(s) affected in this change: test/base/twilltestcase.py diffs (30 lines): diff -r 73d8b2acef0a -r 3190f7d6b572 test/base/twilltestcase.py --- a/test/base/twilltestcase.py Mon Jun 08 16:47:01 2009 -0400 +++ b/test/base/twilltestcase.py Mon Jun 08 16:52:55 2009 -0400 @@ -548,22 +548,11 @@ # Check for refresh_on_change attribute, submit a change if required if 'refresh_on_change' in control.attrs.keys(): changed = False - for elem in kwd[control.name]: - # For DataToolParameter, control.value is the index of the DataToolParameter select list, - # but elem is the filename. The following loop gets the filename of that index. - param_text = '' - for param in tc.show().split('<select'): - param = ('<select' + param.split('select>')[0] + 'select>').replace('selected', 'selected="yes"') - if param.find('on_chang') != -1 and param.find('name="%s"' % control.name) != -1: - tree = ElementTree.fromstring(param) - for option in tree.findall('option'): - if option.get('value') in control.value: - param_text = option.text.strip() - break - break - if elem not in control.value and param_text.find(elem) == -1 : + item_labels = [ item.attrs[ 'label' ] for item in control.get_items() if item.selected ] #For DataToolParameter, control.value is the HDA id, but kwd contains the filename. This loop gets the filename/label for the selected values. + for value in kwd[ control.name ]: + if value not in control.value and True not in [ value in item_label for item_label in item_labels ]: changed = True - break + break if changed: # Clear Control and set to proper value control.clear()