Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 399cc6c

Browse files
committed
Merge pull request #9 from Yelp/sc932_fix_flaky_test
Fix test that flakes depending on order
2 parents 869f183 + 928b727 commit 399cc6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_weighted_positivity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
from unittest import TestCase
66
from StringIO import StringIO
7+
import testify as T
78

89
from positive_category_words.weighted_category_positivity import WeightedPositiveWords
910

@@ -84,7 +85,7 @@ def test_review_mapper(self):
8485
job = WeightedPositiveWords()
8586
review_results = list(job.review_mapper(CATEGORY, biz_review_positivity))
8687
results = [((CATEGORY, u'world'), (BIZ_NAME, 3)), ((CATEGORY, u'hello'), (BIZ_NAME, 3))]
87-
self.assertEqual(review_results, results)
88+
T.assert_sorted_equal(review_results, results)
8889

8990
if __name__ == '__main__':
9091
unittest.main()

0 commit comments

Comments
 (0)