class_docstr: Tests gradients of univariate unidimensional functions.
docstr: Tests with sin function.
docstr_tok: ["Tests","with","sin","function","."]
code: def test_sin(self, tol):
      """Tests with sin function."""
      x_vals = np.linspace(-10, 10, 16, endpoint=False)
      g = qml.grad(np.sin, 0)
      auto_grad = [g(x) for x in x_vals]
      correct_grad = np.cos(x_vals)
  
      assert np.allclose(auto_grad, correct_grad, atol=tol, rtol=0)
  
imports: import autograd
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 1 for calling the TestGradientUnivar obj's underlying member method code with example usage: obj.test_sin(tol) without return types