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
1 changed files with 3 additions and 4 deletions

View File

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