Exemplo n.º 1
0
def test_variables():
    a = "dog"
    b = "cat"
    c = "man"
    reference = [a, b, c]
    item = [a, b]
    assert can_be_made(reference, item) == True
Exemplo n.º 2
0
def test_exact_variables():
    a = "dog"
    b = "cat"
    c = "man"
    reference = [a, b, c]
    item = [a, b]
    assert can_be_made(reference, item, exact_match=True) == False
Exemplo n.º 3
0
def test_variables_fail():
    a = "dog"
    b = "cat"
    c = "man"
    d = "monkey"
    reference = [a, b, c]
    item = [a, b, d]
    assert can_be_made(reference, item) == False
Exemplo n.º 4
0
def test_integers_same_length():
    reference = (1, 2, 3, 4)
    test = (2, 3, 4, 1)
    assert can_be_made(reference, test) == True
Exemplo n.º 5
0
def test_double_letter_in_item():
    assert can_be_made("basoon", "bass") == False
Exemplo n.º 6
0
def test_same_letters_different_amounts():
    assert can_be_made("settee", "tsetse") == False
Exemplo n.º 7
0
def test_different_length_string_fail():
    assert can_be_made("poter", "stop") == False
Exemplo n.º 8
0
def test_word():
    reference = ["happy", "birthday", "to", "you"]
    item = ["happy", "birthday"]
    assert can_be_made(reference, item) == True
Exemplo n.º 9
0
def test_different_length_list():
    reference = ["p", "o", "t", "s", "e", "r"]
    item = ["s", "t", "o", "p"]
    assert can_be_made(reference, item) == True
Exemplo n.º 10
0
def test_exact_word():
    reference = ["happy", "birthday", "to", "you"]
    item = ["happy", "birthday"]
    assert can_be_made(reference, item, exact_match=True) == False
Exemplo n.º 11
0
def test_exact_test_longer_than_reference():
    reference = ["p", "o", "t", "s", "e", "r"]
    item = ["s", "t", "o", "p", "i", "m", "e", "r"]
    assert can_be_made(reference, item, exact_match=True) == False
Exemplo n.º 12
0
def test_exact_different_length_list():
    reference = ["p", "o", "t", "s", "e", "r"]
    item = ["s", "t", "o", "p"]
    assert can_be_made(reference, item, exact_match=True) == False
Exemplo n.º 13
0
def test_three_double_letters_in_item():
    assert can_be_made("abcdefg", "aabbccd") == False
Exemplo n.º 14
0
def test_two_double_letters_in_item():
    assert can_be_made("basoons", "baboons") == False
Exemplo n.º 15
0
def test_different_length_string():
    assert can_be_made("poster", "stop") == True
Exemplo n.º 16
0
def test_exact_integers_same_length():
    reference = (1, 2, 3, 4)
    item = (2, 3, 4, 1)
    assert can_be_made(reference, item, exact_match=True) == True
Exemplo n.º 17
0
def test_exact_same_length_list():
    reference = ["p", "o", "t", "s"]
    item = ["s", "t", "o", "p"]
    assert can_be_made(reference, item, exact_match=True) == True
Exemplo n.º 18
0
def test_double_letter_both():
    assert can_be_made("posters", "stops") == True
Exemplo n.º 19
0
def test_mixed_element_types():
    reference = (1, 2, 3, 4, "a", "b", 1.2)
    item = (2, 3, 4, 1, "a", 1.2)
    assert can_be_made(reference, item) == True
Exemplo n.º 20
0
def test_double_letter_in_reference():
    assert can_be_made("bassoon", "bas") == True
Exemplo n.º 21
0
def test_exact_same_length_string():
    assert can_be_made("pots", "stop", exact_match=True) == True
Exemplo n.º 22
0
def test_two_double_letters_in_reference():
    assert can_be_made("decorator", "doctor") == True
Exemplo n.º 23
0
def test_same_length_string_fail():
    assert can_be_made("pott", "stop") == False
Exemplo n.º 24
0
def test_three_double_letters_in_reference():
    assert can_be_made("diskettes", "diskett") == True
Exemplo n.º 25
0
def test_exact_different_length_string():
    assert can_be_made("poster", "stop", exact_match=True) == False
Exemplo n.º 26
0
def test_same_length_string():
    assert can_be_made("pots", "stop") == True
Exemplo n.º 27
0
def test_exact_same_letters_different_amounts():
    assert can_be_made("settee", "tsetse", exact_match=True) == False
Exemplo n.º 28
0
def test_item_longer_than_ref():
    assert can_be_made("poster", "stopper") == False