def test_function_attributes(cache):
    """ Simple tests for attribute preservation. """

    def tfunc(a, b):
        """test function docstring."""
        return a + b
    cfunc = cache()(tfunc)
    assert cfunc.__doc__ == tfunc.__doc__
    assert hasattr(cfunc, 'cache_info')
    assert hasattr(cfunc, 'cache_clear')
    assert hasattr(cfunc, '__wrapped__')