示例#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
示例#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
示例#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
示例#4
0
def test_integers_same_length():
    reference = (1, 2, 3, 4)
    test = (2, 3, 4, 1)
    assert can_be_made(reference, test) == True
示例#5
0
def test_double_letter_in_item():
    assert can_be_made("basoon", "bass") == False
示例#6
0
def test_same_letters_different_amounts():
    assert can_be_made("settee", "tsetse") == False
示例#7
0
def test_different_length_string_fail():
    assert can_be_made("poter", "stop") == False
示例#8
0
def test_word():
    reference = ["happy", "birthday", "to", "you"]
    item = ["happy", "birthday"]
    assert can_be_made(reference, item) == True
示例#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
示例#10
0
def test_exact_word():
    reference = ["happy", "birthday", "to", "you"]
    item = ["happy", "birthday"]
    assert can_be_made(reference, item, exact_match=True) == False
示例#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
示例#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
示例#13
0
def test_three_double_letters_in_item():
    assert can_be_made("abcdefg", "aabbccd") == False
示例#14
0
def test_two_double_letters_in_item():
    assert can_be_made("basoons", "baboons") == False
示例#15
0
def test_different_length_string():
    assert can_be_made("poster", "stop") == True
示例#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
示例#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
示例#18
0
def test_double_letter_both():
    assert can_be_made("posters", "stops") == True
示例#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
示例#20
0
def test_double_letter_in_reference():
    assert can_be_made("bassoon", "bas") == True
示例#21
0
def test_exact_same_length_string():
    assert can_be_made("pots", "stop", exact_match=True) == True
示例#22
0
def test_two_double_letters_in_reference():
    assert can_be_made("decorator", "doctor") == True
示例#23
0
def test_same_length_string_fail():
    assert can_be_made("pott", "stop") == False
示例#24
0
def test_three_double_letters_in_reference():
    assert can_be_made("diskettes", "diskett") == True
示例#25
0
def test_exact_different_length_string():
    assert can_be_made("poster", "stop", exact_match=True) == False
示例#26
0
def test_same_length_string():
    assert can_be_made("pots", "stop") == True
示例#27
0
def test_exact_same_letters_different_amounts():
    assert can_be_made("settee", "tsetse", exact_match=True) == False
示例#28
0
def test_item_longer_than_ref():
    assert can_be_made("poster", "stopper") == False