Пример #1
0
def test__deep_diff__examples(case):
    left = case["left"]
    right = case["right"]
    order = case["order"]
    answer = case["answer"]

    result = deep_diff(left, right, order=order)
    assert answer == result
Пример #2
0
def test__autocomplete_system__examples(case):
    symbols = case["symbols"]
    query = case["query"]
    answer = case["answer"]

    result = autocomplete_system(symbols, query)

    assert not deep_diff(answer, result, order=False)
Пример #3
0
def test__deep_diff__signature(case):
    left = case["left"]
    right = case["right"]

    result = deep_diff(left, right)
    assert type(result) in (type(None), str)
Пример #4
0
def test__group_anagrams__given_examples(case):
    words = case["words"]
    grouped_anagrams = case["grouped_anagrams"]

    result = group_anagrams(words)
    assert not deep_diff(grouped_anagrams, result)
Пример #5
0
def test__possible_combinations__examples(case):
    message = case["message"]
    answer = case["answer"]

    result = possible_combinations(message)
    assert not deep_diff(answer, result)