diff --git a/spacy/tests/doc/test_doc_api.py b/spacy/tests/doc/test_doc_api.py index 136affab2..ea832c136 100644 --- a/spacy/tests/doc/test_doc_api.py +++ b/spacy/tests/doc/test_doc_api.py @@ -617,5 +617,5 @@ def test_doc_set_ents_spans(en_tokenizer): retokenizer.merge(span) # If this line is uncommented, it works: # print(spans) - doc.ents = list(doc.ents) + spans - print([ent.text for ent in doc.ents]) + doc.ents = spans + assert [ent.text for ent in doc.ents] == ["Colombia", "Czech Republic"]