예제 #1
0
def test_middle_letter_instert():
    # check if the 1st letter is the only one different
    original_word = 'midle'
    compare_word = 'middle'
    expected = True

    actual = one_way(original_word, compare_word)

    assert actual == expected, "Error on test_middle_letter_instert."
예제 #2
0
def test_empty_words():
    # check if the 1st letter is the only one different
    original_word = 'abcde'
    compare_word = ''
    expected = False

    actual = one_way(original_word, compare_word)

    assert actual == expected, "Error on test_empty_words."
예제 #3
0
def test_last_letter_is_diff_two():
    # check if the 1st letter is the only one different
    original_word = 'sale'
    compare_word = 'sal'
    expected = True

    actual = one_way(original_word, compare_word)

    assert actual == expected, "Error on test_last_letter_is_diff_two."
예제 #4
0
def test_same_letters_dff_order():
    # check if the 1st letter is the only one different
    original_word = 'abcde'
    compare_word = 'ebcda'
    expected = False

    actual = one_way(original_word, compare_word)

    assert actual == expected, "Error on test_same_words."