From 6172af8158bdae041063f57d328a807d3be3191a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 10:54:54 +0200 Subject: [PATCH] Auto-format code with black (#10857) Co-authored-by: explosion-bot --- spacy/tests/pipeline/test_entity_linker.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/spacy/tests/pipeline/test_entity_linker.py b/spacy/tests/pipeline/test_entity_linker.py index ccf26f890..a6cfead77 100644 --- a/spacy/tests/pipeline/test_entity_linker.py +++ b/spacy/tests/pipeline/test_entity_linker.py @@ -1076,12 +1076,23 @@ def test_no_gold_ents(patterns): # this will run the pipeline on the examples and shouldn't crash results = nlp.evaluate(train_examples) + @pytest.mark.issue(9575) def test_tokenization_mismatch(): nlp = English() # include a matching entity so that update isn't skipped - doc1 = Doc(nlp.vocab, words=["Kirby", "123456"], spaces=[True, False], ents=["B-CHARACTER", "B-CARDINAL"]) - doc2 = Doc(nlp.vocab, words=["Kirby", "123", "456"], spaces=[True, False, False], ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"]) + doc1 = Doc( + nlp.vocab, + words=["Kirby", "123456"], + spaces=[True, False], + ents=["B-CHARACTER", "B-CARDINAL"], + ) + doc2 = Doc( + nlp.vocab, + words=["Kirby", "123", "456"], + spaces=[True, False, False], + ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"], + ) eg = Example(doc1, doc2) train_examples = [eg]