Use local path in test_lemmatizer

This commit is contained in:
Matthew Honnibal 2016-10-12 19:35:00 +02:00
parent 1318d0bc65
commit 20c948361b

View File

@ -3,6 +3,7 @@ from __future__ import unicode_literals
import os import os
import io import io
import pickle import pickle
import pathlib
from spacy.lemmatizer import Lemmatizer, read_index, read_exc from spacy.lemmatizer import Lemmatizer, read_index, read_exc
from spacy import util from spacy import util
@ -12,12 +13,15 @@ import pytest
@pytest.fixture @pytest.fixture
def path(): def path():
return util.match_best_version('en', None, if 'SPACY_DATA' in os.environ:
os.environ.get('SPACY_DATA', util.get_data_path())) return pathlib.Path(os.environ['SPACY_DATA'])
else:
return util.match_best_version('en', None, util.get_data_path())
@pytest.fixture @pytest.fixture
def lemmatizer(path): def lemmatizer(path):
print('Path', repr(path))
return Lemmatizer.load(path) return Lemmatizer.load(path)