From cfa187aaf0a10fe124663b877d3551643631a660 Mon Sep 17 00:00:00 2001 From: Henning Peters Date: Fri, 18 Dec 2015 10:58:02 +0100 Subject: [PATCH] fix tests --- spacy/language.py | 1 - spacy/tests/tagger/test_lemmatizer.py | 4 ++-- spacy/util.py | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spacy/language.py b/spacy/language.py index 7a96e12ea..cbbd942b5 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -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) diff --git a/spacy/tests/tagger/test_lemmatizer.py b/spacy/tests/tagger/test_lemmatizer.py index 6950f010f..e25fbe199 100644 --- a/spacy/tests/tagger/test_lemmatizer.py +++ b/spacy/tests/tagger/test_lemmatizer.py @@ -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 diff --git a/spacy/util.py b/spacy/util.py index 69e3ba237..be0b2f433 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -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)