def test_zipLists3(list1): list2 = Linked_list() list2.append(5) list2.append(9) actual = zipLists(list1, list2) expected = '{1} -> {5} -> {3} -> {9} -> {2} -> NULL' assert actual == expected
def test_zipLists2(list2): list1 = Linked_list() list1.append(1) list1.append(3) actual = zipLists(list1, list2) expected = '{1} -> {5} -> {3} -> {9} -> {4} -> NULL' assert actual == expected
def test_zip_test(): list = Linked_list() list1 = Linked_list() list2 = Linked_list() list1.append_node("1") list1.append_node("3") list1.append_node("5") list1.append_node("7") list2.append_node("2") list2.append_node("4") list2.append_node("6") list2.append_node("8") list2.append_node("9") list2.append_node("10") a = zipLists(list1, list2) return a
def test_linked_list_zip_list1_shorter(): ll1 = LinkedList() ll1.append(1) ll1.append(3) ll2 = LinkedList() ll2.append(5) ll2.append(9) ll2.append(4) expected = LinkedList() expected.append(1) expected.append(5) expected.append(3) expected.append(9) expected.append(4) actual = zipLists(ll1, ll2) assert str(actual) == str(expected)
def test_zipLists(list1, list2): actual = zipLists(list1, list2) expected = '{1} -> {5} -> {3} -> {9} -> {2} -> {4} -> NULL' assert actual == expected