예제 #1
0
 def test_too_long_list(self):
     self.assertEqual(
         typo_weight([u'żółw'] * (MAX_PROPOSITONS + 1), u'żółw'), 0.0)
예제 #2
0
 def test_few_in_list_last_correct(self):
     self.assertEqual(typo_weight([u'żółw', u'tygrys', u'małpa'], u'małpa'),
                      0.5)
예제 #3
0
 def test_zero_list(self):
     self.assertEqual(typo_weight([], u'żółw'), 0.0)
예제 #4
0
 def test_one_correct_in_list(self):
     self.assertEqual(typo_weight([u'żółw'], u'żółw'), 1.0)
예제 #5
0
 def test_zero_list(self):
     self.assertEqual(typo_weight([], u'żółw'), 0.0)
예제 #6
0
 def test_few_in_list_last_correct(self):
     self.assertEqual(typo_weight([u'żółw', u'tygrys', u'małpa'], u'małpa'), 0.5)
예제 #7
0
 def test_one_correct_in_list(self):
     self.assertEqual(typo_weight([u'żółw'], u'żółw'), 1.0)
예제 #8
0
 def test_too_long_list(self):
     self.assertEqual(typo_weight([u'żółw'] * (MAX_PROPOSITONS + 1), u'żółw'), 0.0)