mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
more specific functional tool tests involving fasta_indexes.loc
rename entries such that they are suffixed by the column name (execpt for dbkey). this makes tests more specific, because this ensures that always the correct column is used.
This commit is contained in:
@@ -1217,7 +1217,7 @@ class ToolsTestCase(ApiTestCase, TestsTools):
|
||||
tool_test_dicts = [{
|
||||
"inputs": {
|
||||
"input": ["simple_line.txt"],
|
||||
"index": ["hg18"],
|
||||
"index": ["hg18_value"],
|
||||
},
|
||||
"outputs": {},
|
||||
"required_files": [['simple_line.txt', {'value': 'simple_line.txt', 'dbkey': 'hg18'}]],
|
||||
@@ -1235,7 +1235,7 @@ class ToolsTestCase(ApiTestCase, TestsTools):
|
||||
tool_test_dicts = [{
|
||||
"inputs": {
|
||||
"input": ["simple_line.txt"],
|
||||
"index": ["hg18"],
|
||||
"index": ["hg18_value"],
|
||||
},
|
||||
"outputs": {},
|
||||
"required_files": [['simple_line.txt', {'value': 'simple_line.txt', 'dbkey': 'hgnot18'}]],
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
hg19 hg19 hg19 hg19
|
||||
hg18 hg18 hg18 hg18
|
||||
hg19_value hg19 hg19_name hg19_path
|
||||
hg18_value hg18 hg18_name hg18_path
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<element name="e2" value="simple_line_alternative.txt" dbkey="hg19"/>
|
||||
</collection>
|
||||
</param>
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output">
|
||||
<assert_contents><has_text text="hg19" /></assert_contents>
|
||||
<assert_contents><has_text text="hg19_value" /></assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
<!-- can choose any dbkey if none specified in reference -->
|
||||
@@ -44,10 +44,10 @@
|
||||
<element name="e2" value="simple_line_alternative.txt"/>
|
||||
</collection>
|
||||
</param>
|
||||
<param name="index" value="hg18" />
|
||||
<param name="index" value="hg18_value" />
|
||||
<output name="output">
|
||||
<assert_contents>
|
||||
<has_text text="hg18" /></assert_contents>
|
||||
<has_text text="hg18_value" /></assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
<!-- can choose any dbkey specified in reference -->
|
||||
@@ -58,9 +58,9 @@
|
||||
<element name="e2" value="simple_line_alternative.txt" dbkey="hg18"/>
|
||||
</collection>
|
||||
</param>
|
||||
<param name="index" value="hg18" />
|
||||
<param name="index" value="hg18_value" />
|
||||
<output name="output">
|
||||
<assert_contents><has_text text="hg18" /></assert_contents>
|
||||
<assert_contents><has_text text="hg18_value" /></assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
<!-- cant choose a dkkey different from reference -->
|
||||
@@ -71,9 +71,9 @@
|
||||
<element name="e2" value="simple_line_alternative.txt" dbkey="hg19"/>
|
||||
</collection>
|
||||
</param>
|
||||
<param name="index" value="hg18" />
|
||||
<param name="index" value="hg18_value" />
|
||||
<output name="output">
|
||||
<assert_contents><not_has_text text="hg18" /></assert_contents>
|
||||
<assert_contents><not_has_text text="hg18_value" /></assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
</tests>
|
||||
|
||||
@@ -21,19 +21,19 @@ cat '$inputs' > '$output'
|
||||
<!-- can choose a dbkey if it matches input -->
|
||||
<test>
|
||||
<param name="inputs" value="simple_line.txt" dbkey="hg19" />
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output" file="simple_line.txt" />
|
||||
</test>
|
||||
<!-- choose any dbkey if not specified in reference -->
|
||||
<test>
|
||||
<param name="inputs" value="simple_line.txt" />
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output" file="simple_line.txt" />
|
||||
</test>
|
||||
<!-- cant choose a dkkey different from reference -->
|
||||
<test expect_failure="true">
|
||||
<param name="inputs" value="simple_line.txt" dbkey="hg18" />
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output" file="simple_line.txt" />
|
||||
</test>
|
||||
</tests>
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
<!-- can choose a dbkey if it matches input -->
|
||||
<test>
|
||||
<param name="inputs" value="simple_line.txt,simple_line.txt" dbkey="hg19" />
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output" file="simple_line_x2.txt"/>
|
||||
</test>
|
||||
<!-- can choose any dbkey if none specified in reference -->
|
||||
<test>
|
||||
<param name="inputs" value="simple_line.txt,simple_line.txt" />
|
||||
<param name="index" value="hg19" />
|
||||
<param name="index" value="hg19_value" />
|
||||
<output name="output" file="simple_line_x2.txt"/>
|
||||
</test>
|
||||
<!-- can choose any dbkey none specified in reference -->
|
||||
<test expect_failure="true">
|
||||
<param name="inputs" value="simple_line.txt,simple_line.txt" dbkey="hg19"/>
|
||||
<param name="index" value="hg18" />
|
||||
<param name="index" value="hg18_value" />
|
||||
<output name="output" file="simple_line_x2.txt"/>
|
||||
</test>
|
||||
</tests>
|
||||
|
||||
@@ -26,7 +26,7 @@ echo foo > '$mapped_reads'
|
||||
<tests>
|
||||
<test>
|
||||
<param name="input" value="simple_line.txt" dbkey="hg18" />
|
||||
<param name="index" value="hg18"/>
|
||||
<param name="index" value="hg18_value"/>
|
||||
<output name="mapped_reads">
|
||||
<metadata name="dbkey" value="hg18" />
|
||||
<assert_contents>
|
||||
|
||||
@@ -45,10 +45,10 @@ echo $index_regexp_keep >> '$output' &&
|
||||
<tests>
|
||||
<!-- can choose a dbkey if it matches input -->
|
||||
<test>
|
||||
<param name="index_static" value="hg19" />
|
||||
<param name="index_static_keep" value="hg19" />
|
||||
<param name="index_regexp" value="hg19" />
|
||||
<param name="index_regexp_keep" value="hg19" />
|
||||
<param name="index_static" value="hg19_value" />
|
||||
<param name="index_static_keep" value="hg19_value" />
|
||||
<param name="index_regexp" value="hg19_value" />
|
||||
<param name="index_regexp_keep" value="hg19_value" />
|
||||
<output name="output">
|
||||
<assert_contents>
|
||||
<has_text text="hg19" />
|
||||
@@ -60,24 +60,24 @@ echo $index_regexp_keep >> '$output' &&
|
||||
<!-- Does this make sense - if no dbkey is defined there is no option
|
||||
available? -->
|
||||
<test expect_failure="true">
|
||||
<param name="index_static" value="hg18" />
|
||||
<param name="index_static_keep" value="hg19" />
|
||||
<param name="index_regexp" value="hg19" />
|
||||
<param name="index_regexp_keep" value="hg19" />
|
||||
<param name="index_static" value="hg18_value" />
|
||||
<param name="index_static_keep" value="hg19_value" />
|
||||
<param name="index_regexp" value="hg19_value" />
|
||||
<param name="index_regexp_keep" value="hg19_value" />
|
||||
<output name="output"/>
|
||||
</test>
|
||||
<test expect_failure="true">
|
||||
<param name="index_static" value="hg19" />
|
||||
<param name="index_static_keep" value="hg18" />
|
||||
<param name="index_regexp" value="hg19" />
|
||||
<param name="index_regexp_keep" value="hg19" />
|
||||
<param name="index_static" value="hg19_value" />
|
||||
<param name="index_static_keep" value="hg18_value" />
|
||||
<param name="index_regexp" value="hg19_value" />
|
||||
<param name="index_regexp_keep" value="hg19_value" />
|
||||
<output name="output"/>
|
||||
</test>
|
||||
<test expect_failure="true">
|
||||
<param name="index_static" value="hg19" />
|
||||
<param name="index_static_keep" value="hg19" />
|
||||
<param name="index_regexp" value="hg18" />
|
||||
<param name="index_regexp_keep" value="hg19" />
|
||||
<param name="index_static" value="hg19_value" />
|
||||
<param name="index_static_keep" value="hg19_value" />
|
||||
<param name="index_regexp" value="hg18_value" />
|
||||
<param name="index_regexp_keep" value="hg19_value" />
|
||||
<output name="output"/>
|
||||
</test>
|
||||
<test expect_failure="true">
|
||||
|
||||
@@ -6,8 +6,8 @@ echo $choose_value > '$out_file'
|
||||
<param name="choose_value" type="select">
|
||||
<options from_data_table="test_fasta_indexes">
|
||||
<!-- contains hg18 and hg19 -->
|
||||
<filter type="remove_value" value="hg18"/>
|
||||
<filter type="remove_value" value="hg20"/>
|
||||
<filter type="remove_value" value="hg18_value"/>
|
||||
<filter type="remove_value" value="hg20_value"/>
|
||||
<!-- This doesn't work as we don't have the remaining values like name and path
|
||||
<filter type="add_value" value="hg20"/>
|
||||
-->
|
||||
@@ -21,12 +21,12 @@ echo $choose_value > '$out_file'
|
||||
<test>
|
||||
<output name="out_file">
|
||||
<assert_contents>
|
||||
<has_line line="hg19" />
|
||||
<has_line line="hg19_value" />
|
||||
</assert_contents>
|
||||
</output>
|
||||
</test>
|
||||
<test expect_failure="true">
|
||||
<param name="choose_value" value="hg18"/>
|
||||
<param name="choose_value" value="hg18_value"/>
|
||||
</test>
|
||||
</tests>
|
||||
</tool>
|
||||
|
||||
@@ -5,7 +5,7 @@ echo select_single '$select_single' > '$output' &&
|
||||
echo select_multiple '$select_multiple' >> '$output' &&
|
||||
echo select_collection '$select_collection' >> '$output'
|
||||
]]></command>
|
||||
<inputs>
|
||||
<inputs>
|
||||
<param name="single" type="data" format="tabular" label="single"/>
|
||||
<param name="select_single" type="select" label="select_single">
|
||||
<options from_dataset="single">
|
||||
@@ -22,14 +22,14 @@ echo select_collection '$select_collection' >> '$output'
|
||||
<validator type="no_options" message="No data is available in single" />
|
||||
</options>
|
||||
</param>
|
||||
<param name="collection" type="data_collection" format="tabular" collection_type="list" label="collection"/>
|
||||
<param name="collection" type="data_collection" format="tabular" collection_type="list" label="collection"/>
|
||||
<param name="select_collection" type="select" multiple="true" label="select_collection">
|
||||
<options from_dataset="collection">
|
||||
<column name="name" index="0"/>
|
||||
<column name="value" index="0"/>
|
||||
<validator type="no_options" message="No data is available in single" />
|
||||
</options>
|
||||
</param>
|
||||
</param>
|
||||
</inputs>
|
||||
|
||||
<outputs>
|
||||
@@ -39,16 +39,16 @@ echo select_collection '$select_collection' >> '$output'
|
||||
<tests>
|
||||
<test>
|
||||
<param name="single" value="1.tabular" />
|
||||
<param name="select_single" value="chr10" />
|
||||
<param name="select_single" value="chr10" />
|
||||
<param name="multiple" value="1.tabular,2.tabular" />
|
||||
<param name="select_multiple" value="chr10,7" />
|
||||
<param name="collection">
|
||||
<collection type="list">
|
||||
<element name="1" value="1.tabular" />
|
||||
<element name="2" value="2.tabular" />
|
||||
<param name="collection">
|
||||
<collection type="list">
|
||||
<element name="1" value="1.tabular" />
|
||||
<element name="2" value="2.tabular" />
|
||||
</collection>
|
||||
</param>
|
||||
<param name="select_collection" value="chr10,7" />
|
||||
</param>
|
||||
<param name="select_collection" value="chr10,7" />
|
||||
<output name="output">
|
||||
<assert_contents>
|
||||
<has_text text="select_single chr10" />
|
||||
|
||||
Reference in New Issue
Block a user