mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
fix tests
This commit is contained in:
parent
8359bd4d93
commit
cfa187aaf0
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user