From 01f9ae774cca1cdd66353575c9cbe55a91c31813 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 18 Jun 2020 14:01:19 +0200 Subject: [PATCH] small fixes --- spacy/tests/regression/test_issue4313.py | 4 ++++ spacy/tests/regression/test_issue4529.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/spacy/tests/regression/test_issue4313.py b/spacy/tests/regression/test_issue4313.py index 946316d85..46f79d6f5 100644 --- a/spacy/tests/regression/test_issue4313.py +++ b/spacy/tests/regression/test_issue4313.py @@ -1,5 +1,7 @@ from collections import defaultdict +import pytest + from spacy.pipeline.defaults import default_ner from spacy.pipeline import EntityRecognizer @@ -7,6 +9,8 @@ from spacy.lang.en import English from spacy.tokens import Span +# skipped after removing Beam stuff during the Example/GoldParse refactor +@pytest.mark.skip def test_issue4313(): """ This should not crash or exit with some strange error code """ beam_width = 16 diff --git a/spacy/tests/regression/test_issue4529.py b/spacy/tests/regression/test_issue4529.py index 89b16a484..0708499de 100644 --- a/spacy/tests/regression/test_issue4529.py +++ b/spacy/tests/regression/test_issue4529.py @@ -1,9 +1,11 @@ import pytest +from spacy.gold import Example + @pytest.mark.parametrize( "text,words", [("A'B C", ["A", "'", "B", "C"]), ("A-B", ["A-B"])] ) def test_gold_misaligned(en_tokenizer, text, words): doc = en_tokenizer(text) - GoldParse(doc, words=words) + Example.from_dict(doc, {"words": words})