def test_edit_functions_transpose_at_start(): from_word, to_word = "mandate","amndate" edit, index = errors.get_edit_function(from_word, to_word) assert edit.function(from_word, index) == to_word assert edit.name == "m<->a"
def test_edit_functions_near_end(): from_word, to_word = "mandate","mandatey" edit, index = errors.get_edit_function(from_word, to_word) assert edit.function(from_word, index) == to_word assert edit.name == "--->y"
def test_edit_functions_transpose_at_end(): from_word, to_word = "mandate","mandaet" edit, index = errors.get_edit_function(from_word, to_word) assert edit.function(from_word, index) == to_word assert edit.name == "t<->e"
def test_edit_functions_reproduce_insertion(from_word,to_word): edit, index = errors.get_edit_function(from_word, to_word) assert edit.function(from_word, index) == to_word