Skip to content

Commit

Permalink
TEMPFIX: skip unit tests that rely on q2-longitudinal if it is not in…
Browse files Browse the repository at this point in the history
…stalled
  • Loading branch information
nbokulich committed Jun 7, 2024
1 parent 14dd23a commit d8ea2b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions rescript/tests/test_cross_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@
import qiime2
import pandas as pd
import pandas.testing as pdt
import pytest

from rescript import cross_validate


import_data = qiime2.Artifact.import_data

try:
from qiime2.plugins import longitudinal
import_q2l = True
except ImportError:
import_q2l = False


@pytest.mark.skipif(not import_q2l, reason="requires q2-longitudinal")
class TestPipelines(TestPluginBase):
package = 'rescript.tests'

Expand Down
11 changes: 10 additions & 1 deletion rescript/tests/test_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@
import numpy as np
import pandas.testing as pdt
from q2_types.feature_data import DNAIterator
import pytest

from rescript import evaluate


import_data = qiime2.Artifact.import_data

try:
from qiime2.plugins import longitudinal
import_q2l = True
except ImportError:
import_q2l = False


class TestEvaluateUtilities(TestPluginBase):
package = 'rescript.tests'
Expand Down Expand Up @@ -56,7 +63,9 @@ def setUp(self):
self.taxa = import_data(
'FeatureData[Taxonomy]', self.get_data_path('derep-taxa.tsv'))

# this just tests that the pipeline runs, other tests test proper function
# This just tests that the pipeline runs, other tests test proper function.
# We skip this if q2-longitudinal is not installed.
@pytest.mark.skipif(not import_q2l, reason="requires q2-longitudinal")
def test_pipeline(self):
rescript.actions.evaluate_taxonomy([self.taxa], ["name"], "")

Expand Down

0 comments on commit d8ea2b4

Please sign in to comment.