mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix bugs in test and code introduced in PR #1113.
This commit is contained in:
@@ -602,11 +602,12 @@ def determine_output_format(output, parameter_context, input_datasets, input_dat
|
||||
|
||||
if collection_name in input_dataset_collections:
|
||||
try:
|
||||
input_collection = input_dataset_collections[collection_name]
|
||||
input_collection = input_dataset_collections[collection_name][0]
|
||||
input_dataset = input_collection.collection[element_index].element_object
|
||||
input_extension = input_dataset.ext
|
||||
ext = input_extension
|
||||
except Exception:
|
||||
except Exception, e:
|
||||
log.debug("Exception while trying to determine format_source: %s", e)
|
||||
pass
|
||||
|
||||
# process change_format tags
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
</inputs>
|
||||
<outputs>
|
||||
<!-- Access by element name (for paired data) -->
|
||||
<data format="txt" from_work_dir="1" name="format_source_1_output" format_source="input_collection['forward']" />
|
||||
<data from_work_dir="1" name="format_source_1_output" format_source="input_collection['forward']" />
|
||||
<!-- Access by element index (for any collection) -->
|
||||
<data format="txt" from_work_dir="2" name="format_source_2_output" format_source="input_collection[0]" />
|
||||
<data from_work_dir="2" name="format_source_2_output" format_source="input_collection[0]" />
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
|
||||
@@ -212,7 +212,7 @@ def __assert_output_format_is( expected, output, input_extensions=[], param_cont
|
||||
dce2 = model.DatasetCollectionElement(collection=c1, element=hda_reverse, element_identifier="reverse", element_index=1)
|
||||
c1.elements = [dce1, dce2]
|
||||
|
||||
input_collections["hdcai"] = hc1
|
||||
input_collections["hdcai"] = (hc1, False)
|
||||
|
||||
actual_format = determine_output_format( output, param_context, inputs, input_collections, last_ext )
|
||||
assert actual_format == expected, "Actual format %s, does not match expected %s" % (actual_format, expected)
|
||||
|
||||
Reference in New Issue
Block a user