Esempio n. 1
0
def test_merge_lists_no_dupes(base, additional):
    left = deepcopy(base) + additional
    right = deepcopy(base) + additional
    expected = list(set(left))
    got = merge_lists(base, left, right)
    assert len(got) == len(expected)
    assert all([expected_item in expected + got for expected_item in expected])
Esempio n. 2
0
def test_merge_lists_unique_items_present(base, left_additional, right_additional):
    left = deepcopy(base) + left_additional
    right = deepcopy(base) + right_additional
    expected = list(set(deepcopy(base) + left_additional + right_additional))
    got = merge_lists(base, left, right)
    assert len(got) == len(expected)
    assert all([expected_item in expected + got for expected_item in expected])
Esempio n. 3
0
def test_merge_lists_no_dupes(base, additional):
    left = deepcopy(base) + additional
    right = deepcopy(base) + additional
    expected = list(set(left))
    got = merge_lists(base, left, right)
    assert len(got) == len(expected)
    assert all([expected_item in expected + got for expected_item in expected])
Esempio n. 4
0
def test_merge_lists_unique_items_present(base, left_additional,
                                          right_additional):
    left = deepcopy(base) + left_additional
    right = deepcopy(base) + right_additional
    expected = sorted(
        list(set(deepcopy(base) + left_additional + right_additional)))
    got = sorted(merge_lists(base, left, right))
    assert got == expected
Esempio n. 5
0
def test_merge_lists_unique_items_present(base, left_additional,
                                          right_additional):
    left = deepcopy(base) + left_additional
    right = deepcopy(base) + right_additional
    expected = list(set(deepcopy(base) + left_additional + right_additional))
    got = merge_lists(base, left, right)
    assert len(got) == len(expected)
    assert all([expected_item in expected + got for expected_item in expected])
Esempio n. 6
0
def test_merge_lists_no_dupes(base, additional):
    left = deepcopy(base) + additional
    right = deepcopy(base) + additional
    expected = sorted(list(set(left)))
    got = sorted(merge_lists(base, left, right))
    assert got == expected
Esempio n. 7
0
def test_merge_lists_no_dupes(base, additional):
    left = deepcopy(base) + additional
    right = deepcopy(base) + additional
    expected = sorted(list(set(left)))
    got = sorted(merge_lists(base, left, right))
    assert got == expected
Esempio n. 8
0
def test_merge_lists_unique_items_present(base, left_additional, right_additional):
    left = deepcopy(base) + left_additional
    right = deepcopy(base) + right_additional
    expected = sorted(list(set(deepcopy(base) + left_additional + right_additional)))
    got = sorted(merge_lists(base, left, right))
    assert got == expected