From 0226b3bf0e388d6341ae03e4384aa2f479286b3b Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sun, 29 Sep 2019 17:34:56 +0200 Subject: [PATCH] Fix test imports --- spacy/tests/doc/test_add_entities.py | 8 ++++---- spacy/tests/regression/test_issue4042.py | 5 ++--- spacy/tests/regression/test_issue4054.py | 4 ++-- spacy/tests/serialize/test_serialize_kb.py | 6 +++--- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/spacy/tests/doc/test_add_entities.py b/spacy/tests/doc/test_add_entities.py index 374c3ddd8..6c69e699a 100644 --- a/spacy/tests/doc/test_add_entities.py +++ b/spacy/tests/doc/test_add_entities.py @@ -1,12 +1,12 @@ # coding: utf-8 from __future__ import unicode_literals -from ...pipeline import EntityRecognizer -from ..util import get_doc -from ...tokens import Span - +from spacy.pipeline import EntityRecognizer +from spacy.tokens import Span import pytest +from ..util import get_doc + def test_doc_add_entities_set_ents_iob(en_vocab): text = ["This", "is", "a", "lion"] diff --git a/spacy/tests/regression/test_issue4042.py b/spacy/tests/regression/test_issue4042.py index 73872df0b..500be9f2a 100644 --- a/spacy/tests/regression/test_issue4042.py +++ b/spacy/tests/regression/test_issue4042.py @@ -2,14 +2,13 @@ from __future__ import unicode_literals import spacy - from spacy.pipeline import EntityRecognizer, EntityRuler - from spacy.lang.en import English -from spacy.tests.util import make_tempdir from spacy.tokens import Span from spacy.util import ensure_path +from ..util import make_tempdir + def test_issue4042(): """Test that serialization of an EntityRuler before NER works fine.""" diff --git a/spacy/tests/regression/test_issue4054.py b/spacy/tests/regression/test_issue4054.py index 2c9d73751..cc84cebf8 100644 --- a/spacy/tests/regression/test_issue4054.py +++ b/spacy/tests/regression/test_issue4054.py @@ -2,12 +2,12 @@ from __future__ import unicode_literals from spacy.vocab import Vocab - import spacy from spacy.lang.en import English -from spacy.tests.util import make_tempdir from spacy.util import ensure_path +from ..util import make_tempdir + def test_issue4054(en_vocab): """Test that a new blank model can be made with a vocab from file, diff --git a/spacy/tests/serialize/test_serialize_kb.py b/spacy/tests/serialize/test_serialize_kb.py index 67fd9f0d4..b19c11864 100644 --- a/spacy/tests/serialize/test_serialize_kb.py +++ b/spacy/tests/serialize/test_serialize_kb.py @@ -1,11 +1,11 @@ # coding: utf-8 from __future__ import unicode_literals -from ..util import make_tempdir -from ...util import ensure_path - +from spacy.util import ensure_path from spacy.kb import KnowledgeBase +from ..util import make_tempdir + def test_serialize_kb_disk(en_vocab): # baseline assertions