def test_find(self): x = [ 1, 2, 3, ] lst = UnrolledLinkedList(Node()) lst.insert(0, 1) lst.insert(1, 2) index = lst.find(1) self.assertEqual(0, index)
def test_find(self): lst = UnrolledLinkedList(5) self.assertEqual(lst.find(2), False) lst = UnrolledLinkedList(5).add(1).add(2).add(3) self.assertEqual(lst.find(2), True) self.assertEqual(lst.find(4), False)