Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Nov 23, 2021
1 parent fda42e3 commit 5be1139
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions test/unit/tool_util/test_tool_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,14 @@
"""

NO_SECTIONS_XML = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<tool>
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
</tool>
"""

NO_WHEN_IN_CONDITIONAL_XML = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<inputs>
<conditional name="labels">
<param name="label_select" type="select" label="Points to label">
Expand All @@ -70,6 +68,9 @@

RADIO_SELECT_INCOMPATIBILITIES = """
<tool>
<command>
$radio_select $checkboxes_select $checkboxes_select_correct
</command>
<inputs>
<param name="radio_select" type="select" display="radio" optional="true" multiple="true">
<option value="1">1</option>
Expand All @@ -90,6 +91,9 @@

SELECT_DUPLICATED_OPTIONS = """
<tool>
<command>
$select
</command>
<inputs>
<param name="select" type="select" optional="true" multiple="true">
<option value="v">x</option>
Expand All @@ -100,9 +104,7 @@
"""

SELECT_DEPRECATIONS = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<command>$select_do$select_ff$select_fp</command>
<inputs>
<param name="select_do" type="select" dynamic_options="blah()"/>
Expand All @@ -118,6 +120,9 @@

SELECT_OPTION_DEFINITIONS = """
<tool>
<command>
$select_noopt $select_noopts $select_fd_op $select_fd_fdt $select_noval_notext
</command>
<inputs>
<param name="select_noopt" type="select"/>
<param name="select_noopts" type="select">
Expand All @@ -140,9 +145,7 @@
"""

VALIDATOR_INCOMPATIBILITIES = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<command>$param_name</command>
<inputs>
<param name="param_name" type="text">
Expand All @@ -154,9 +157,10 @@
"""

VALIDATOR_CORRECT = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<command>
$data_param $collection_param $text_param $select_param $int_param
</command>
<inputs>
<param name="data_param" type="data" format="data">
<validator type="metadata" check="md1,md2" skip="md3,md4" message="cutom validation message" negate="true"/>
Expand Down Expand Up @@ -199,9 +203,7 @@
"""

PARAMETER_IN_COMMAND = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<command>
$simple1
${ simple2 }
Expand Down Expand Up @@ -261,9 +263,7 @@
"""

PARAMETER_IN_COMMAND_WITH_INPUTS = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<command>
do something with $inputs ## but note, the linter does not check if inputs is really used
</command>
Expand All @@ -280,9 +280,7 @@
# check that linter accepts format source for collection elements as means to specify format
# and that the linter warns if format and format_source are used
OUTPUTS_COLLECTION_FORMAT_SOURCE = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<outputs>
<collection name="output_collection" type="paired">
<data name="forward" format_source="input_readpair" />
Expand All @@ -294,9 +292,7 @@

# check that linter does not complain about missing format if from_tool_provided_metadata is used
OUTPUTS_DISCOVER_TOOL_PROVIDED_METADATA = """
<tool name="BWA Mapper" id="bwa" version="1.0.1" is_multi_byte="true" display_interface="true" require_login="true" hidden="true">
<description>The BWA Mapper</description>
<version_command interpreter="python">bwa.py --version</version_command>
<tool>
<outputs>
<data name="output">
<discover_datasets from_tool_provided_metadata="true"/>
Expand Down

0 comments on commit 5be1139

Please sign in to comment.