Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/data/tools/bwa_wrong_version.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<tool id="bwa" name="BWA" version="0.1.0">
<requirements>
<requirement type="package" version="0.7.12">bwa</requirement>
</requirements>
<stdio>
<exit_code range="2:" />
</stdio>
<command><![CDATA[
bwa > $output_1 2>&1
]]></command>
<inputs>
</inputs>
<outputs>
<data name="output_1" />
</outputs>
<help><![CDATA[
TODO: Fill in help.
]]></help>
<tests>
<test>
<output name="output_1">
<assert_contents>
<has_text text="Version: 0.7.10" />
</assert_contents>
</output>
</test>
</tests>
</tool>
1 change: 0 additions & 1 deletion tests/test_cmd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class CmdTestTestCase(CliTestCase):
"""Integration tests for the ``test`` command."""

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
@skip_if_environ("PLANEMO_SKIP_CWLTOOL_TESTS")
@skip_unless_environ("PLANEMO_RUN_BETA_TESTS")
def test_workflow_test_simple(self):
"""Test testing a simple workflow with Galaxy."""
Expand Down
43 changes: 43 additions & 0 deletions tests/test_cmd_test_conda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""Module contains :class:`CmdTestTestCase` - integration tests for the ``test`` command."""
import os

from .test_utils import (
CliTestCase,
PROJECT_TEMPLATES_DIR,
skip_if_environ,
TEST_TOOLS_DIR,
)


class CmdTestTestCase(CliTestCase):
"""Integration tests for the ``test`` command."""

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_conda_dependencies(self):
with self._isolate():
bwa_test = os.path.join(PROJECT_TEMPLATES_DIR, "conda_testing", "bwa.xml")
test_command = [
"--verbose",
"test",
"--conda_dependency_resolution",
"--conda_auto_install",
"--conda_auto_init",
bwa_test,
]
self._check_exit_code(test_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_conda_dependencies_version(self):
"""Test testing a simple workflow with Galaxy."""
with self._isolate():
# Try a failing test to ensure the primary test above isn't just passing spuriously.
bwa_test = os.path.join(TEST_TOOLS_DIR, "bwa_wrong_version.xml")
test_command = [
"--verbose",
"test",
"--conda_dependency_resolution",
"--conda_auto_install",
"--conda_auto_init",
bwa_test,
]
self._check_exit_code(test_command, exit_code=1)