def test_is_emtpy_add_at_tail(self): dl = DoublyLinkedList() eq_(dl.is_empty(), True) dl.add_at_tail(10) dl.add_at_tail(20) dl.add_at_tail(30) eq_(dl.is_empty(), False) eq_(dl.head.data, 10) eq_(dl.head.next.prev.data, 10) eq_(dl.head.next.data, 20) eq_(dl.head.next.next.prev.data, 20) eq_(dl.head.next.next.data, 30)