diff --git a/spacy/tests/conftest.py b/spacy/tests/conftest.py index 7c6dcda1b..46eb1e22e 100644 --- a/spacy/tests/conftest.py +++ b/spacy/tests/conftest.py @@ -16,7 +16,6 @@ from ..tokens import Doc from ..strings import StringStore from ..lemmatizer import Lemmatizer from ..attrs import ORTH, TAG, HEAD, DEP -from ..util import match_best_version, get_data_path from io import StringIO, BytesIO from pathlib import Path @@ -91,10 +90,7 @@ def en_entityrecognizer(): @pytest.fixture def lemmatizer(path): - if path is not None: - return Lemmatizer.load(path) - else: - return None + return English.Defaults.ceate_lemmatizer() @pytest.fixture @@ -106,14 +102,6 @@ def text_file_b(): return BytesIO() -@pytest.fixture -def path(): - if 'SPACY_DATA' in os.environ: - return Path(os.environ['SPACY_DATA']) - else: - return match_best_version('en', None, get_data_path()) - - # only used for tests that require loading the models # in all other cases, use specific instances @pytest.fixture(scope="session") diff --git a/spacy/tests/regression/test_issue781.py b/spacy/tests/regression/test_issue781.py index 8a98b48b8..1c48d1534 100644 --- a/spacy/tests/regression/test_issue781.py +++ b/spacy/tests/regression/test_issue781.py @@ -6,5 +6,5 @@ import pytest # Note: "chromosomes" worked previous the bug fix @pytest.mark.parametrize('word,lemmas', [("chromosomes", ["chromosome"]), ("endosomes", ["endosome"]), ("colocalizes", ["colocalize", "colocaliz"])]) -def test_issue781(path, lemmatizer, word, lemmas): +def test_issue781(lemmatizer, word, lemmas): assert lemmatizer(word, 'noun', morphology={'number': 'plur'}) == set(lemmas)