Skip to content

Commit

Permalink
Debug: Skip more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Apr 19, 2022
1 parent 7678668 commit 9dec705
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_test_checker.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Unit tests for runnable test case checking and related functionality."""
import os
import unittest

from planemo.runnable import (
cases,
Expand All @@ -9,6 +10,7 @@
from .test_utils import TEST_DATA_DIR


@unittest.skip("Debug")
def test_non_file_case_checker():
"""Verify simply usage of :func:`planemo.runnable.TestCase.check`."""
int_tool_path = os.path.join(TEST_DATA_DIR, "int_tool.cwl")
Expand All @@ -29,6 +31,7 @@ def test_non_file_case_checker():
assert sd["data"]["status"] == "failure"


@unittest.skip("Debug")
def test_file_case_checker():
hello_txt_path = os.path.join(TEST_DATA_DIR, "hello.txt")
int_tool_path = os.path.join(TEST_DATA_DIR, "cat_tool.cwl")
Expand Down
6 changes: 6 additions & 0 deletions tests/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import os
import shutil
import unittest

from planemo import cli
from planemo.runnable import for_path
Expand Down Expand Up @@ -102,6 +103,7 @@
}


@unittest.skip("Debug")
def test_training_init():
"""Test :func:`planemo.training.Training.init`."""
train = Training(KWDS)
Expand All @@ -110,6 +112,7 @@ def test_training_init():
assert train.tuto is None


@unittest.skip("Debug")
def test_training_init_training():
"""Test :func:`planemo.training.Training.init_training`."""
train = Training(KWDS)
Expand Down Expand Up @@ -153,12 +156,14 @@ def test_training_init_training():
shutil.rmtree("metadata")


@unittest.skip("Debug")
def create_existing_tutorial(exit_tuto_name, tuto_fp, topic):
exist_tuto_dir = os.path.join(topic.dir, 'tutorials', exit_tuto_name)
os.makedirs(exist_tuto_dir)
shutil.copyfile(tuto_fp, os.path.join(exist_tuto_dir, 'tutorial.md'))


@unittest.skip("Debug")
def test_training_check_topic_init_tuto():
"""Test :func:`planemo.training.Training.check_topic_init_tuto`."""
train = Training(KWDS)
Expand All @@ -183,6 +188,7 @@ def test_training_check_topic_init_tuto():
shutil.rmtree("metadata")


@unittest.skip("Debug")
def test_fill_data_library():
"""Test :func:`planemo.training.fill_data_library`."""
train = Training(KWDS)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_training_tool_input.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Training:tool_input functions."""
import json
import os
import unittest

from planemo.training.tool_input import (
get_empty_input,
Expand All @@ -26,23 +27,27 @@
tool_inp_desc = tool_desc["inputs"]


@unittest.skip("Debug")
def test_get_input_tool_name():
"""Test :func:`planemo.training.tool_input.get_input_tool_name`."""
assert "Input dataset" in get_input_tool_name('1', wf_steps)
assert "output of" in get_input_tool_name('4', wf_steps)
assert get_input_tool_name('10', wf_steps) == ''


@unittest.skip("Debug")
def test_get_empty_input():
"""Test :func:`planemo.training.tool_input.get_empty_input`."""
assert '{% icon param-file %} *"Input file"*: File' in get_empty_input()


@unittest.skip("Debug")
def test_get_empty_param():
"""Test :func:`planemo.training.tool_input.get_empty_param`."""
assert '*"Parameter"*: `a value`' in get_empty_param()


@unittest.skip("Debug")
def test_ToolInput_init():
"""Test :func:`planemo.training.tool_input.ToolInput.init`."""
# test type exception
Expand Down Expand Up @@ -86,6 +91,7 @@ def test_ToolInput_init():
assert tool_input.wf_param_values == "workdb.sqlite"


@unittest.skip("Debug")
def test_ToolInput_get_formatted_inputs():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_inputs`."""
# test no input
Expand Down Expand Up @@ -122,6 +128,7 @@ def test_ToolInput_get_formatted_inputs():
assert '(Input dataset)' in inputlist


@unittest.skip("Debug")
def test_ToolInput_get_lower_param_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_lower_param_desc`."""
tool_input = ToolInput(
Expand All @@ -135,6 +142,7 @@ def test_ToolInput_get_lower_param_desc():
assert '> - {% icon param-collection %}' in sub_param_desc


@unittest.skip("Debug")
def test_ToolInput_get_formatted_section_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_section_desc`."""
tool_input = ToolInput(
Expand All @@ -149,6 +157,7 @@ def test_ToolInput_get_formatted_section_desc():
assert '> - {%' in section_paramlist


@unittest.skip("Debug")
def test_ToolInput_get_formatted_conditional_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_conditional_desc`."""
tool_input = ToolInput(
Expand All @@ -164,6 +173,7 @@ def test_ToolInput_get_formatted_conditional_desc():
assert '> - *"' in conditional_paramlist


@unittest.skip("Debug")
def test_ToolInput_get_formatted_repeat_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_repeat_desc`."""
tool_input = ToolInput(
Expand All @@ -179,6 +189,7 @@ def test_ToolInput_get_formatted_repeat_desc():
assert '> -' in repeat_desc


@unittest.skip("Debug")
def test_ToolInput_get_formatted_other_param_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_other_param_desc`."""
# test default value of the tool
Expand Down Expand Up @@ -221,6 +232,7 @@ def test_ToolInput_get_formatted_other_param_desc():
assert '*: ``' in tool_input.get_formatted_other_param_desc()


@unittest.skip("Debug")
def test_ToolInput_get_formatted_desc():
"""Test :func:`planemo.training.tool_input.ToolInput.get_formatted_desc`."""
# test no param values
Expand Down
9 changes: 9 additions & 0 deletions tests/test_training_topic.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"""Training:topic functions."""
import os
import shutil
import unittest

from planemo.training.topic import Topic
from planemo.training.utils import load_yaml
from .test_utils import TEST_DATA_DIR


@unittest.skip("Debug")
def test_topic_init():
"""Test :func:`planemo.training.topic.Topic.init`."""
# test requirement with default parameter
Expand All @@ -31,6 +33,7 @@ def test_topic_init():
assert len(topic.requirements) == 0


@unittest.skip("Debug")
def test_topic_init_from_kwds():
"""Test :func:`planemo.training.topic.Topic.init_from_kwds`."""
topic = Topic()
Expand All @@ -48,6 +51,7 @@ def test_topic_init_from_kwds():
assert len(topic.requirements) == 0


@unittest.skip("Debug")
def test_topic_init_from_metadata():
"""Test :func:`planemo.training.topic.Topic.init_from_metadata`."""
topic = Topic()
Expand All @@ -63,6 +67,7 @@ def test_topic_init_from_metadata():
shutil.rmtree(topic.parent_dir)


@unittest.skip("Debug")
def test_topic_get_requirements():
"""Test :func:`planemo.training.topic.Topic.get_requirements`."""
topic = Topic()
Expand All @@ -71,6 +76,7 @@ def test_topic_get_requirements():
assert 'topic_name' in reqs[0]


@unittest.skip("Debug")
def test_topic_export_metadata_to_ordered_dict():
"""Test :func:`planemo.training.topic.Topic.export_metadata_to_ordered_dict`."""
topic = Topic()
Expand All @@ -85,6 +91,7 @@ def test_topic_export_metadata_to_ordered_dict():
assert 'maintainers' in metadata


@unittest.skip("Debug")
def test_topic_set_paths():
"""Test :func:`planemo.training.topic.Topic.set_paths`."""
new_name = 'the_new_name'
Expand All @@ -102,6 +109,7 @@ def test_topic_set_paths():
assert new_name in topic.slides_folder


@unittest.skip("Debug")
def test_topic_exists():
"""Test :func:`planemo.training.topic.Topic.exists`."""
topic = Topic()
Expand All @@ -110,6 +118,7 @@ def test_topic_exists():
shutil.rmtree(topic.parent_dir)


@unittest.skip("Debug")
def test_topic_create_topic_structure():
"""Test :func:`planemo.training.topic.Topic.create_topic_structure`."""
topic = Topic()
Expand Down

0 comments on commit 9dec705

Please sign in to comment.