mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Test case for passing null to optional tool input.
This commit is contained in:
@@ -106,6 +106,20 @@ class ToolsTestCase( api.ApiTestCase ):
|
||||
output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output )
|
||||
assert output1_content == "--ex1,ex2"
|
||||
|
||||
@skip_without_tool( "multi_select" )
|
||||
def test_multi_select_optional( self ):
|
||||
history_id = self.dataset_populator.new_history()
|
||||
inputs = {
|
||||
"select_ex": ["--ex1"],
|
||||
"select_optional": None,
|
||||
}
|
||||
response = self._run( "multi_select", history_id, inputs, assert_ok=True )
|
||||
output = response[ "outputs" ]
|
||||
output1_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output[ 0 ] )
|
||||
output2_content = self.dataset_populator.get_history_dataset_content( history_id, dataset=output[ 1 ] )
|
||||
assert output1_content.strip() == "--ex1"
|
||||
assert output2_content.strip() == "None", output2_content
|
||||
|
||||
@skip_without_tool( "multi_data_param" )
|
||||
def test_multidata_param( self ):
|
||||
history_id = self.dataset_populator.new_history()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<configfiles>
|
||||
<configfile name="config">${select_ex}</configfile>
|
||||
</configfiles>
|
||||
<command>cat $config > $output</command>
|
||||
<command>cat $config > $output; echo '$select_optional' > $output2</command>
|
||||
<inputs>
|
||||
<param name="select_ex" type="select" display="checkboxes" multiple="true">
|
||||
<option value="--ex1">Ex1</option>
|
||||
@@ -12,9 +12,17 @@
|
||||
<option value="--ex4">Ex4</option>
|
||||
<option value="ex5">Ex5</option>
|
||||
</param>
|
||||
<param name="select_optional" type="select" optional="true">
|
||||
<option value="--ex1">Ex1</option>
|
||||
<option value="ex2">Ex2</option>
|
||||
<option value="--ex3">Ex3</option>
|
||||
<option value="--ex4">Ex4</option>
|
||||
<option value="ex5">Ex5</option>
|
||||
</param>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data format="txt" name="output" />
|
||||
<data format="txt" name="output2" />
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
|
||||
Reference in New Issue
Block a user