1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-03-10 13:44:37 +00:00

Fixed a flaky test which was broken in python 2.7rc1.

This commit is contained in:
Virgil Dupras 2010-06-07 10:15:58 -04:00
parent 601b67145c
commit 75eb005ba0

View File

@ -369,11 +369,10 @@ class GetMatches(TestCase):
def test_null_and_unrelated_objects(self): def test_null_and_unrelated_objects(self):
l = [NamedObject("foo bar"),NamedObject("bar bleh"),NamedObject(""),NamedObject("unrelated object")] l = [NamedObject("foo bar"),NamedObject("bar bleh"),NamedObject(""),NamedObject("unrelated object")]
r = getmatches(l) r = getmatches(l)
self.assertEqual(1,len(r)) eq_(len(r), 1)
m = r[0] m = r[0]
self.assertEqual(50,m.percentage) eq_(m.percentage, 50)
self.assertEqual(['foo','bar'],m.first.words) assert_match(m, 'foo bar', 'bar bleh')
self.assertEqual(['bar','bleh'],m.second.words)
def test_twice_the_same_word(self): def test_twice_the_same_word(self):
l = [NamedObject("foo foo bar"),NamedObject("bar bleh")] l = [NamedObject("foo foo bar"),NamedObject("bar bleh")]