Only compare sorted patterns in test

Try to work around flaky tests on Python 3.5
This commit is contained in:
Ines Montani 2019-07-10 13:00:52 +02:00
parent 82045aac8a
commit 4e04080b76

View File

@ -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):