From c4d29ad1b64881701dfc100c8f73ff532fa2e5d0 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 17 Dec 2014 09:38:49 -0500 Subject: [PATCH] Fix gz/zip upload of files to test framework. With test case to ensure they don't break again. Problem was due to a small switch of an if to an elif in 7114d15a6d22 which had been sort of masking over an older bug. Thanks to Peter Cock for reporting the issue. --- lib/galaxy/tools/test.py | 4 +++- test/functional/tools/gzipped_inputs.xml | 19 +++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 test/functional/tools/gzipped_inputs.xml diff --git a/lib/galaxy/tools/test.py b/lib/galaxy/tools/test.py index 4f5b20c4cbd..2c15cacc445 100644 --- a/lib/galaxy/tools/test.py +++ b/lib/galaxy/tools/test.py @@ -195,7 +195,9 @@ class ToolTestBuilder( object ): if isinstance( value, basic.DataToolParameter ): if not isinstance(param_value, list): param_value = [ param_value ] - processed_value = [ self.__add_uploaded_dataset( context.for_state(), v, param_extra, value ) for v in param_value ] + map( lambda v: self.__add_uploaded_dataset( context.for_state(), v, param_extra, value ), +param_value ) + processed_value = param_value elif isinstance( value, basic.DataCollectionToolParameter ): assert 'collection' in param_extra collection_def = param_extra[ 'collection' ] diff --git a/test/functional/tools/gzipped_inputs.xml b/test/functional/tools/gzipped_inputs.xml new file mode 100644 index 00000000000..5b73d34005b --- /dev/null +++ b/test/functional/tools/gzipped_inputs.xml @@ -0,0 +1,19 @@ + + + cat $input1 > $out_file1 + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 063bc1b45fb..158cb399406 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -11,6 +11,7 @@ +