def test(self): """Testing linked list""" linked_list = LinkedList((1, 2, 3)) self.assertEqual(linked_list.__str__(), '1, 2, 3')
def test_linked_insert(given, value, index, expected): linked = LinkedList(given) linked.insert(value, index) assert linked.__str__() == expected
def test_linked_delete(given, index, expected): linked = LinkedList(given) linked.delete(index) assert linked.__str__() == expected
def test_linked_prepend(given, value, expected): linked = LinkedList(given) linked.prepend(value) assert linked.__str__() == expected