def test_push_pop(self): test_list = DoubleLinkedList() test_list.push(5) self.assertEqual(test_list.len(), 1) self.assertEqual(test_list.pop(), 5)
def test_pop_empty(self): test_list = DoubleLinkedList() self.assertEqual(test_list.pop(), "list is empty")
def test_pop(self): test_list = DoubleLinkedList() for i in range(5): test_list.push(i) for i in range(5): self.assertEqual(test_list.pop(), 4 - i)
def test_pop(self): list_1 = DoubleLinkedList() list_1.push(1) list_1.pop() self.assertEqual(list_1.len(), 0)