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