From 4e04080b760fd3019d74259ae2172a836846317d Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 10 Jul 2019 13:00:52 +0200 Subject: [PATCH] Only compare sorted patterns in test Try to work around flaky tests on Python 3.5 --- spacy/tests/pipeline/test_entity_ruler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tests/pipeline/test_entity_ruler.py b/spacy/tests/pipeline/test_entity_ruler.py index a371be38b..5ab1a3af0 100644 --- a/spacy/tests/pipeline/test_entity_ruler.py +++ b/spacy/tests/pipeline/test_entity_ruler.py @@ -111,7 +111,7 @@ def test_entity_ruler_serialize_bytes(nlp, patterns): assert len(new_ruler.patterns) == len(ruler.patterns) for pattern in ruler.patterns: assert pattern in new_ruler.patterns - assert new_ruler.labels == ruler.labels + assert sorted(new_ruler.labels) == sorted(ruler.labels) def test_entity_ruler_serialize_phrase_matcher_attr_bytes(nlp, patterns):