Skip to content

Commit

Permalink
Better quick test annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Nov 15, 2018
1 parent e0056de commit 1e1cfa4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_cmd_training_generate_from_wf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from .test_utils import (
CliTestCase,
TEST_DATA_DIR
skip_if_environ,
TEST_DATA_DIR,
)


Expand All @@ -28,6 +29,7 @@ def create_tutorial_dir(topic_n, tuto_n):
class CmdTrainingGenerateFromWfTestCase(CliTestCase):
"""Container class defining test cases for the ``training_generate_from_wf`` command."""

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_generate_from_wf_command_empty(self):
"""Test training_generate_from_wf command with no arguments."""
with self._isolate():
Expand All @@ -36,6 +38,7 @@ def test_training_generate_from_wf_command_empty(self):
]
self._check_exit_code(training_fill_data_library_command, exit_code=2)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_generate_from_wf_command_topic(self):
"""Test training_generate_from_wf command with only topic name."""
with self._isolate():
Expand All @@ -45,6 +48,7 @@ def test_training_generate_from_wf_command_topic(self):
]
self._check_exit_code(training_fill_data_library_command, exit_code=2)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_generate_from_wf_command_local_wf(self):
"""Test training_generate_from_wf command with local workflow."""
with self._isolate():
Expand All @@ -62,6 +66,7 @@ def test_training_generate_from_wf_command_local_wf(self):
self._check_exit_code(training_init_command, exit_code=0)
shutil.rmtree("topics")

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_generate_from_wf_command_remote_wf(self):
"""Test training_generate_from_wf command with workflow on running instance."""
with self._isolate():
Expand Down
8 changes: 8 additions & 0 deletions tests/test_cmd_training_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@

from .test_utils import (
CliTestCase,
skip_if_environ,
TEST_DATA_DIR
)


class CmdTrainingInitTestCase(CliTestCase):
"""Container class defining test cases for the ``training_init`` command."""

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_by_default(self):
"""Test training_init command with only topic name."""
with self._isolate():
Expand All @@ -19,6 +21,7 @@ def test_training_init_command_by_default(self):
]
self._check_exit_code(training_init_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_topic(self):
"""Test training_init command to create new topic."""
with self._isolate():
Expand All @@ -41,6 +44,7 @@ def test_training_init_command_topic(self):
]
self._check_exit_code(training_init_command, exit_code=2)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_tutorial_no_topic(self):
"""Test training_init command with tutorial but no topic."""
with self._isolate():
Expand All @@ -51,6 +55,7 @@ def test_training_init_command_tutorial_no_topic(self):
]
self._check_exit_code(training_init_command, exit_code=2)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_tutorial(self):
"""Test training_init command to create new tutorial."""
with self._isolate():
Expand All @@ -65,6 +70,7 @@ def test_training_init_command_tutorial(self):
]
self._check_exit_code(training_init_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_tutorial_zenodo(self):
"""Test training_init command to create new tutorial with zenodo."""
with self._isolate():
Expand All @@ -87,6 +93,7 @@ def test_training_init_command_tutorial_zenodo(self):
]
self._check_exit_code(training_init_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_tutorial_local_wf(self):
"""Test training_init command to create new tutorial with local workflow."""
with self._isolate():
Expand All @@ -100,6 +107,7 @@ def test_training_init_command_tutorial_local_wf(self):
]
self._check_exit_code(training_init_command, exit_code=0)

@skip_if_environ("PLANEMO_SKIP_GALAXY_TESTS")
def test_training_init_command_tutorial_remote_wf(self):
"""Test training_init command to create new tutorial with workflow on running instance."""
with self._isolate():
Expand Down

0 comments on commit 1e1cfa4

Please sign in to comment.