Esempio n. 1
0
def test_zip_nums1():
    num1 = LinkedList()
    num1.append('5')
    num1.append('2')
 
    num2 = LinkedList()
    num2.append('7')
    
    lst = zipLists(num1,num2)
    assert lst.__str__() == '5->7->2-> NULL'
Esempio n. 2
0
def test_sorted():
    num1 = LinkedList()
    num1.append('5')
    num1.append('6')

    num2 = LinkedList()
    num2.append('3')
    num2.append('4')

    lst = to_sorted(num1,num2)
    assert lst.__str__() == '3->4->5->6-> NULL'
Esempio n. 3
0
def test_zip():
    fruits = LinkedList()
    fruits.append('apple')
    fruits.append('berries')
    fruits.append('banana')
 
    veggies = LinkedList()
    veggies.append('Carrots')
    veggies.append('Broccoli')
    veggies.append('Mushrooms')

    lst = zipLists(fruits,veggies)
    assert lst.__str__() == 'apple->Carrots->berries->Broccoli->banana->Mushrooms-> NULL'
Esempio n. 4
0
def test_zip_null():
    num1 = LinkedList() 
    num2 = LinkedList()    
    lst = zipLists(num1,num2)
    assert lst.__str__() == ' NULL'