Fix OntoNotes dataset path iterator test by using set equality
@@ -122,8 +122,10 @@ class TestOntonotes(AllenNlpTestCase):
def test_dataset_path_iterator(self):
reader = Ontonotes()
files = list(reader.dataset_path_iterator('tests/fixtures/conll_2012/'))
- assert files == ['tests/fixtures/conll_2012/subdomain/example.gold_conll',
+ expected_paths = ['tests/fixtures/conll_2012/subdomain/example.gold_conll',
'tests/fixtures/conll_2012/subdomain2/example.gold_conll']
+ assert len(files) == len(expected_paths)
+ assert set(files) == set(expected_paths)
def test_ontonotes_can_read_conll_file_with_multiple_documents(self):
reader = Ontonotes()
