From 70a43858e16184c2bc408b404a3b11dcad4f9526 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 24 Apr 2017 00:06:30 +0200 Subject: [PATCH] Fix flakey test --- spacy/tests/regression/test_issue999.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spacy/tests/regression/test_issue999.py b/spacy/tests/regression/test_issue999.py index 8726adede..e32d5671d 100644 --- a/spacy/tests/regression/test_issue999.py +++ b/spacy/tests/regression/test_issue999.py @@ -70,6 +70,8 @@ def test_issue999(train_data): doc = nlp2(raw_text) ents = {(ent.start_char, ent.end_char): ent.label_ for ent in doc.ents} for start, end, label in entity_offsets: - if (start, end) not in ents: - print(ents) - assert ents[(start, end)] == label + if (start, end) in ents: + assert ents[(start, end)] == label + break + else: + raise Exception(ents)