示例#1
0
 def test_speller_bad_word(self):
     result = get_correct_spelling("xxxdddd")
     self.assertEqual(result, "xxxdddd")
示例#2
0
 def test_speller_insert_letter(self):
     result = get_correct_spelling("cigarrette")
     self.assertEqual(result, "cigarette")
示例#3
0
 def test_speller_short_common_word(self):
     result = get_correct_spelling("teh")
     self.assertEqual(result, "the")
示例#4
0
 def test_speller_long_common_word(self):
     result = get_correct_spelling("cigarete")
     self.assertEqual(result, "cigarette")
示例#5
0
 def test_speller_good_word(self):
     result = get_correct_spelling("speling")
     self.assertEqual(result, "spelling")