Exemplo n.º 1
0
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"
Exemplo n.º 2
0
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"
Exemplo n.º 3
0
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"
Exemplo n.º 4
0
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