def test_init_with_list(self): ll = LinkedList(['A', 'B', 'C']) assert ll.head.data == 'A' assert ll.tail.data == 'C' assert ll.as_list() == ['A', 'B', 'C'] assert ll.is_empty() is False
def test_init(self): ll = LinkedList() assert ll.head is None assert ll.tail is None assert ll.as_list() == [] assert ll.is_empty() is True