add parsing xml and yaml test

This commit is contained in:
ValentinMarcon
2019-06-27 11:41:31 +02:00
parent 3eacbeb794
commit 7347e57509
+11
View File
@@ -12,6 +12,9 @@ from galaxy.util import galaxy_directory
TOOL_XML_1 = """
<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>
<xrefs>
<xref type="bio.tools">bwa</xref>
</xrefs>
<version_command interpreter="python">bwa.py --version</version_command>
<parallelism method="multi" split_inputs="input1" split_mode="to_size" split_size="1" merge_outputs="out_file1" />
<command interpreter="python">bwa.py --arg1=42</command>
@@ -311,6 +314,10 @@ class XmlLoaderTestCase(BaseLoaderTestCase):
assert attributes1["compare"] == "sim_size"
assert attributes1["lines_diff"] == 4
def test_xrefs(self):
xrefs = self._tool_source.parse_xrefs()
assert xrefs[0] == "bwa"
def test_exit_code(self):
tool_source = self._get_tool_source(source_contents="""<tool id="bwa" name="bwa">
<command detect_errors="exit_code">
@@ -468,6 +475,10 @@ class YamlLoaderTestCase(BaseLoaderTestCase):
assert attributes1["compare"] == "sim_size"
assert attributes1["lines_diff"] == 4
def test_xrefs(self):
xrefs = self._tool_source.parse_xrefs()
assert xrefs[0] == "bwa"
def test_sanitize(self):
assert self._tool_source.parse_sanitize() is True