Exemple #1
0
 def test_too_long_list(self):
     self.assertEqual(
         typo_weight([u'żółw'] * (MAX_PROPOSITONS + 1), u'żółw'), 0.0)
Exemple #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)
Exemple #3
0
 def test_zero_list(self):
     self.assertEqual(typo_weight([], u'żółw'), 0.0)
Exemple #4
0
 def test_one_correct_in_list(self):
     self.assertEqual(typo_weight([u'żółw'], u'żółw'), 1.0)
Exemple #5
0
 def test_zero_list(self):
     self.assertEqual(typo_weight([], u'żółw'), 0.0)
Exemple #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)
Exemple #7
0
 def test_one_correct_in_list(self):
     self.assertEqual(typo_weight([u'żółw'], u'żółw'), 1.0)
Exemple #8
0
 def test_too_long_list(self):
     self.assertEqual(typo_weight([u'żółw'] * (MAX_PROPOSITONS + 1), u'żółw'), 0.0)