Skip to content

Commit

Permalink
Debug: Skip a number of unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Apr 19, 2022
1 parent 7be5af9 commit 7678668
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_training_tutorial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Training:tutorial functions."""
import os
import shutil
import unittest

from planemo.engine import (
engine_context,
Expand Down Expand Up @@ -41,13 +42,15 @@
training = Training(KWDS)


@unittest.skip("Debug")
def test_get_galaxy_datatype():
"""Test :func:`planemo.training.tutorial.get_galaxy_datatype`."""
assert get_galaxy_datatype("csv", datatype_fp) == "csv"
assert get_galaxy_datatype("test", datatype_fp) == "strange_datatype"
assert "# Please add" in get_galaxy_datatype("unknown", datatype_fp)


@unittest.skip("Debug")
def test_get_zenodo_record():
"""Test :func:`planemo.training.tutorial.get_zenodo_record`."""
z_record, req_res = get_zenodo_record(zenodo_link)
Expand All @@ -71,6 +74,7 @@ def test_get_zenodo_record():
assert file_link_prefix in req_res['files'][0]['links']['self']


@unittest.skip("Debug")
def test_get_wf_inputs():
"""Test :func:`planemo.training.tutorial.get_wf_inputs`."""
step_inp = {
Expand All @@ -96,6 +100,7 @@ def test_get_wf_inputs():
assert 'tt' in step_inputs['add_to_database']['tab']['0']


@unittest.skip("Debug")
def test_get_wf_param_values():
"""Test :func:`planemo.training.tutorial.get_wf_param_values`."""
wf_step = wf['steps']['3']
Expand Down Expand Up @@ -129,6 +134,7 @@ def test_get_hands_on_boxes_from_running_galaxy():
assert_body_contains(tuto_body, '## Sub-step with **Select first**')


@unittest.skip("Debug")
def test_tutorial_init():
"""Test :func:`planemo.training.tutorial.tutorial.init`."""
# with default parameter
Expand Down Expand Up @@ -159,6 +165,7 @@ def test_tutorial_init():
assert "my_tuto" in tuto.dir


@unittest.skip("Debug")
def test_tutorial_init_from_kwds():
"""Test :func:`planemo.training.tutorial.tutorial.init_from_kwds`."""
kwds = {
Expand Down Expand Up @@ -187,6 +194,7 @@ def test_tutorial_init_from_kwds():
assert "my_tuto" in tuto.dir


@unittest.skip("Debug")
def test_tutorial_init_from_existing_tutorial():
"""Test :func:`planemo.training.tutorial.tutorial.init_from_existing_tutorial`."""
tuto = Tutorial(
Expand All @@ -207,6 +215,7 @@ def test_tutorial_init_from_existing_tutorial():
shutil.rmtree("topics")


@unittest.skip("Debug")
def test_tutorial_init_data_lib():
"""Test :func:`planemo.training.tutorial.tutorial.init_data_lib`."""
tuto = Tutorial(
Expand All @@ -231,6 +240,7 @@ def test_tutorial_init_data_lib():
shutil.rmtree("topics")


@unittest.skip("Debug")
def test_tutorial_get_tuto_metata():
"""Test :func:`planemo.training.tutorial.tutorial.get_tuto_metata`."""
tuto = Tutorial(
Expand All @@ -242,6 +252,7 @@ def test_tutorial_get_tuto_metata():
assert '- q1' in metadata


@unittest.skip("Debug")
def test_tutorial_set_dir_name():
"""Test :func:`planemo.training.tutorial.tutorial.set_dir_name`."""
tuto = Tutorial(
Expand All @@ -257,6 +268,7 @@ def test_tutorial_set_dir_name():
assert tuto.name in tuto.wf_fp


@unittest.skip("Debug")
def test_tutorial_exists():
"""Test :func:`planemo.training.tutorial.tutorial.exists`."""
# default
Expand All @@ -270,6 +282,7 @@ def test_tutorial_exists():
shutil.rmtree("topics")


@unittest.skip("Debug")
def test_tutorial_has_workflow():
"""Test :func:`planemo.training.tutorial.tutorial.has_workflow`."""
# default
Expand Down Expand Up @@ -315,6 +328,7 @@ def test_tutorial_export_workflow_file():
shutil.rmtree("topics")


@unittest.skip("Debug")
def test_tutorial_get_files_from_zenodo():
"""Test :func:`planemo.training.tutorial.tutorial.get_files_from_zenodo`."""
tuto = Tutorial(
Expand All @@ -335,6 +349,7 @@ def test_tutorial_get_files_from_zenodo():
assert files[1]['ext'] == 'csv'


@unittest.skip("Debug")
def test_tutorial_prepare_data_library_from_zenodo():
"""Test :func:`planemo.training.tutorial.tutorial.prepare_data_library_from_zenodo`."""
# without zenodo link
Expand All @@ -355,6 +370,7 @@ def test_tutorial_prepare_data_library_from_zenodo():
shutil.rmtree("topics")


@unittest.skip("Debug")
def test_tutorial_write_hands_on_tutorial():
"""Test :func:`planemo.training.tutorial.tutorial.write_hands_on_tutorial`."""
tuto = Tutorial(
Expand Down
6 changes: 6 additions & 0 deletions tests/test_training_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Training:utils functions."""
import os
import unittest

from planemo.training.utils import (
load_yaml,
Expand All @@ -11,6 +12,7 @@
metadata_fp = os.path.join(TEST_DATA_DIR, "training_metadata.yaml")


@unittest.skip("Debug")
def test_load_yaml():
"""Test :func:`planemo.training.utils.load_yaml`."""
metadata = load_yaml(metadata_fp)
Expand All @@ -20,6 +22,7 @@ def test_load_yaml():
assert metadata['maintainers'][0] == 'maintainer1'


@unittest.skip("Debug")
def test_save_to_yaml():
"""Test :func:`planemo.training.utils.save_to_yaml`."""
metadata = load_yaml(metadata_fp)
Expand All @@ -29,6 +32,7 @@ def test_save_to_yaml():
os.remove(new_metadata_fp)


@unittest.skip("Debug")
def test_requirement_init():
"""Test :func:`planemo.training.utils.Requirement.init`."""
# test requirement with default parameter
Expand All @@ -43,6 +47,7 @@ def test_requirement_init():
assert req.link == "URL"


@unittest.skip("Debug")
def test_requirement_init_from_dict():
"""Test :func:`planemo.training.utils.Requirement.init_from_dict`."""
req = Requirement()
Expand All @@ -56,6 +61,7 @@ def test_requirement_init_from_dict():
assert req.link == "http://URL"


@unittest.skip("Debug")
def test_requirement_export_to_ordered_dict():
"""Test :func:`planemo.training.utils.Requirement.export_to_ordered_dict`."""
req = Requirement()
Expand Down
5 changes: 5 additions & 0 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import unittest

from galaxy.util import unicodify

Expand All @@ -11,25 +12,29 @@
)


@unittest.skip("Debug")
@skip_unless_module("lxml")
def test_lxml_validation():
lxml_xsd_validator = validation.LxmlValidator()
_check_validator(lxml_xsd_validator)


@unittest.skip("Debug")
@skip_unless_executable("xmllint")
def test_xmllint_validation():
xmllint_xsd_validator = validation.XmllintValidator()
_check_validator(xmllint_xsd_validator)


@unittest.skip("Debug")
def test_tool_dependencies_validation():
_assert_validates(shed_lint.TOOL_DEPENDENCIES_XSD,
_path("tool_dependencies_good_1.xml"))
_assert_validates(shed_lint.TOOL_DEPENDENCIES_XSD,
_path("tool_dependencies_good_2.xml"))


@unittest.skip("Debug")
def test_repository_dependencies_validation():
_assert_validates(shed_lint.REPO_DEPENDENCIES_XSD,
_path("repository_dependencies.xml"))
Expand Down
2 changes: 2 additions & 0 deletions tests/test_workflow_lint.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import unittest

from planemo.workflow_lint import input_labels
from .test_utils import (
TEST_DATA_DIR,
)


@unittest.skip("Debug")
def test_input_labels():
wf_example_1 = os.path.join(TEST_DATA_DIR, "wf_repos", "basic_format2_ok", "basic_format2.gxwf.yml")
labels = input_labels(wf_example_1)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_xml_diff.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import sys
import unittest
from xml.etree import ElementTree

from planemo.xml.diff import diff
from .test_utils import TEST_DIR


@unittest.skip("Debug")
def test_diff():
# Check with and without reporter.
_check(sys.stdout.write)
Expand Down

0 comments on commit 7678668

Please sign in to comment.