示例#1
0
 def test_split(self, expected, given):
     _ok, result = raw.correct_misspelling(given)
     self.assertEqual(result, expected)
示例#2
0
 def test_deleted_letter(self, expected, given):
     _ok, result = raw.correct_misspelling(given)
     self.assertEqual(result, expected)
示例#3
0
 def test_disallow_lowercased(self):
     expected = 'abraham'
     _ok, result = raw.correct_misspelling('abraham', errors=1)
     self.assertEqual(result, expected)
示例#4
0
 def test_allow_capitalized(self):
     expected = 'This'
     _ok, result = raw.correct_misspelling('This')
     self.assertEqual(result, expected)
示例#5
0
 def test_preserve_capital_letters(self):
     expected = 'Yahoo'
     _ok, result = raw.correct_misspelling('Yahoo')
     self.assertEqual(result, expected)
示例#6
0
 def test_i_instead_of_l(self, expected, given):
     _ok, result = raw.correct_misspelling(given)
     self.assertEqual(result, expected)