def test_split(self, expected, given): _ok, result = raw.correct_misspelling(given) self.assertEqual(result, expected)
def test_deleted_letter(self, expected, given): _ok, result = raw.correct_misspelling(given) self.assertEqual(result, expected)
def test_disallow_lowercased(self): expected = 'abraham' _ok, result = raw.correct_misspelling('abraham', errors=1) self.assertEqual(result, expected)
def test_allow_capitalized(self): expected = 'This' _ok, result = raw.correct_misspelling('This') self.assertEqual(result, expected)
def test_preserve_capital_letters(self): expected = 'Yahoo' _ok, result = raw.correct_misspelling('Yahoo') self.assertEqual(result, expected)
def test_i_instead_of_l(self, expected, given): _ok, result = raw.correct_misspelling(given) self.assertEqual(result, expected)