fix tests

This commit is contained in:
Henning Peters 2015-12-18 10:58:02 +01:00
parent 8359bd4d93
commit cfa187aaf0
3 changed files with 4 additions and 3 deletions

View File

@ -213,7 +213,6 @@ class Language(object):
if model is None:
model = '%s_default' % (lang or 'en')
version = None
print(model, version)
package = get_package(name=model, version=version,
data_path=data_dir)

View File

@ -4,14 +4,14 @@ import io
import pickle
from spacy.lemmatizer import Lemmatizer, read_index, read_exc
from spacy.util import default_package
from spacy.util import get_package
import pytest
@pytest.fixture
def package():
return default_package()
return get_package()
@pytest.fixture

View File

@ -19,6 +19,8 @@ def get_package(name=None, version=None, data_path=None):
sputnik = Sputnik('spacy', '0.100.0') # TODO: retrieve version
pool = sputnik.pool(data_path)
if name is None:
name = 'en_default'
if version:
name += ' ==%s' % version
return pool.get(name)