Skip to content

Commit

Permalink
fix test skips for voikko and spacy analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Nov 21, 2024
1 parent fd8b9a7 commit 419f8df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tests/test_analyzer_spacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import pytest

import annif.analyzer
import annif.analyzer.spacy
from annif.exception import OperationFailedException

spacy = pytest.importorskip("spacy")
pytestmark = pytest.mark.skipif(
not annif.analyzer.spacy.SpacyAnalyzer.is_available(), reason="spaCy is required"
)


def test_spacy_model_not_found():
Expand Down
5 changes: 4 additions & 1 deletion tests/test_analyzer_voikko.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
import pytest

import annif.analyzer
import annif.analyzer.voikko

voikko = pytest.importorskip("annif.analyzer.voikko")
pytestmark = pytest.mark.skipif(
not annif.analyzer.voikko.VoikkoAnalyzer.is_available(), reason="voikko is required"
)


def test_voikko_getstate():
Expand Down

0 comments on commit 419f8df

Please sign in to comment.