[hg] galaxy 3408: Fix bug intorduced in change set 3404:1e85451c...
details: http://www.bx.psu.edu/hg/galaxy/rev/6471c9b8149c changeset: 3408:6471c9b8149c user: Greg Von Kuster <greg@bx.psu.edu> date: Wed Feb 17 14:49:13 2010 -0500 description: Fix bug intorduced in change set 3404:1e85451c9c86 if testing multiple check boxes. Functional tests will now correctly test uploaded file names longer than 30 characters. diffstat: test/base/twilltestcase.py | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diffs (32 lines): diff -r 68dac4d2d94a -r 6471c9b8149c test/base/twilltestcase.py --- a/test/base/twilltestcase.py Wed Feb 17 13:54:44 2010 -0500 +++ b/test/base/twilltestcase.py Wed Feb 17 14:49:13 2010 -0500 @@ -872,16 +872,23 @@ try: checkbox = control.get() checkbox.selected = is_checked( control_value ) - except ClientForm.AmbiguityError: - # if there's more than one checkbox, use the behaviour for - # ClientForm.ListControl - see twill code.. - pass + except Exception, e1: + # if there's more than one checkbox, probably should use the behaviour for + # ClientForm.ListControl ( see twill code ), but this works for now... + for elem in control_value: + control.get( name=elem ).selected = True else: for elem in control_value: control.get( name=elem ).selected = True else: # control.is_of_kind( "singlelist" ) for elem in control_value: - tc.fv( f.name, control.name, str( elem ) ) + # Galaxy truncates long file names in the dataset_collector in ~/parameters/basic.py + if len( elem ) > 30: + elem_name = '%s..%s' % ( elem[:17], elem[-11:] ) + else: + elem_name = elem + + tc.fv( f.name, control.name, str( elem_name ) ) except Exception, exc: errmsg = "Attempting to set field '%s' to value '%s' in form '%s' threw exception: %s\n" % ( control_name, str( control_value ), f.name, str( exc ) ) errmsg += "control: %s\n" % str( control )
participants (1)
-
Greg Von Kuster