def test_shift_empty(self): test_list = DoubleLinkedList() self.assertEqual(test_list.shift(), "list is empty")
def test_shift(self): test_list = DoubleLinkedList() for i in range(5): test_list.push(i) for i in range(5): self.assertEqual(test_list.shift(), i)
def test_unshift_shift(self): test_list = DoubleLinkedList() test_list.unshift(5) self.assertEqual(test_list.len(), 1) self.assertEqual(test_list.shift(), 5)