mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix some doctests that were assuming fixed Python hashing.
Tests are more correct and perhaps less strong as result.
This commit is contained in:
@@ -1376,8 +1376,12 @@ class DrillDownSelectToolParameter( SelectToolParameter ):
|
||||
<input type="radio" name="some_name" value="option5" >Option 5
|
||||
</div>
|
||||
</div>
|
||||
>>> print p.options
|
||||
[{'selected': False, 'name': 'Heading 1', 'value': 'heading1', 'options': [{'selected': False, 'name': 'Option 1', 'value': 'option1', 'options': []}, {'selected': False, 'name': 'Option 2', 'value': 'option2', 'options': []}, {'selected': False, 'name': 'Heading 1', 'value': 'heading1', 'options': [{'selected': False, 'name': 'Option 3', 'value': 'option3', 'options': []}, {'selected': False, 'name': 'Option 4', 'value': 'option4', 'options': []}]}]}, {'selected': False, 'name': 'Option 5', 'value': 'option5', 'options': []}]
|
||||
>>> print sorted(p.options[1].items())
|
||||
[('name', 'Option 5'), ('options', []), ('selected', False), ('value', 'option5')]
|
||||
>>> p.options[0]["name"]
|
||||
'Heading 1'
|
||||
>>> p.options[0]["selected"]
|
||||
False
|
||||
"""
|
||||
def __init__( self, tool, input_source, context=None ):
|
||||
input_source = ensure_input_source( input_source )
|
||||
|
||||
@@ -42,8 +42,10 @@ class ToolInputTranslator( object ):
|
||||
... ''' ) )
|
||||
>>> params = Params( { 'db':'hg17', 'URL':'URL_value', 'org':'Human', 'hgta_outputType':'primaryTable' } )
|
||||
>>> translator.translate( params )
|
||||
>>> print params
|
||||
{'hgta_outputType': 'primaryTable', 'data_type': 'tabular', 'table': 'unknown table', 'URL': 'URL_value?GALAXY_URL=0&_export=1', 'org': 'Human', 'URL_method': 'post', 'db': 'hg17', 'organism': 'Human', 'dbkey': 'hg17', 'description': 'no description'}
|
||||
>>> print sorted(list(params.__dict__.keys()))
|
||||
['URL', 'URL_method', 'data_type', 'db', 'dbkey', 'description', 'hgta_outputType', 'org', 'organism', 'table']
|
||||
>>> params.get('URL', None) in ['URL_value?GALAXY_URL=0&_export=1', 'URL_value?_export=1&GALAXY_URL=0']
|
||||
True
|
||||
"""
|
||||
@classmethod
|
||||
def from_element( cls, elem ):
|
||||
|
||||
@@ -631,8 +631,8 @@ class Params( object ):
|
||||
0
|
||||
>>> par.symbols # replaces unknown symbols with X
|
||||
['alpha', '__lt____gt__', 'XrmX__pd__!']
|
||||
>>> par.flatten() # flattening to a list
|
||||
[('status', 'on'), ('symbols', 'alpha'), ('symbols', '__lt____gt__'), ('symbols', 'XrmX__pd__!')]
|
||||
>>> sorted(par.flatten()) # flattening to a list
|
||||
[('status', 'on'), ('symbols', 'XrmX__pd__!'), ('symbols', '__lt____gt__'), ('symbols', 'alpha')]
|
||||
"""
|
||||
|
||||
# is NEVER_SANITIZE required now that sanitizing for tool parameters can be controlled on a per parameter basis and occurs via InputValueWrappers?
|
||||
|
||||
Reference in New Issue
Block a user