Esempio n. 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."
Esempio n. 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."
Esempio n. 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."
Esempio n. 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."