commit/galaxy-central: jmchilton: Test case for passing null to optional tool input.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/66d38fa8edcb/ Changeset: 66d38fa8edcb User: jmchilton Date: 2014-12-04 17:28:23+00:00 Summary: Test case for passing null to optional tool input. Affected #: 2 files diff -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 test/api/test_tools.py --- a/test/api/test_tools.py +++ b/test/api/test_tools.py @@ -106,6 +106,20 @@ 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() diff -r c5d6eadac9c3d6784361b93ef81c87307b5a4f0f -r 66d38fa8edcbd9926f4eca9b875e2fe561d2d850 test/functional/tools/multi_select.xml --- a/test/functional/tools/multi_select.xml +++ b/test/functional/tools/multi_select.xml @@ -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> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org