def test_linked_list_includes_value(): """Test a linked list can be checked for the inclusion of a value.""" value = 1 linked_list = LinkedList() linked_list.insert(value) assert linked_list.includes(value)
def test_ll_includes_false(): test = LinkedList() test.insert('Apple') expected = False actual = test.includes('Banana') assert actual == expected
def test_ll_includes_true(): test = LinkedList() test.insert('Apple') assert test.includes('Apple')
def test_ll_insert_multiple(): test = LinkedList() test.insert('Apple') test.insert('Cherry') assert test.includes('Apple') assert test.includes('Cherry')