class_docstr: Test for the dispatching logic of the parameter shift method
docstr: Test that the correct ouput and warning is generated in the absence of any trainable
  parameters
docstr_tok: ["Test","that","the","correct","ouput","and","warning","is","generated","in","the","absence","of","any","trainable","parameters"]
code: def test_no_trainable_params_tape(self):
      """Test that the correct ouput and warning is generated in the absence of any trainable
      parameters"""
      dev = qml.device("default.gaussian", wires=2)
  
      weights = [0.1, 0.2]
      with qml.queuing.AnnotatedQueue() as q:
          qml.Displacement(weights[0], 0.0, wires=[0])
          qml.Rotation(weights[1], wires=[0])
          qml.expval(qml.QuadX(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      # TODO: remove once #2155 is resolved
      tape.trainable_params = []
  
      with pytest.warns(
          UserWarning,
          match="gradient of a tape with no trainable parameters",
      ):
          g_tapes, post_processing = qml.gradients.param_shift_cv(
              tape, dev
          )
      res = post_processing(qml.execute(g_tapes, dev, None))
  
      assert g_tapes == []
      assert res.shape == (0,)
  
imports: import unittest.mock
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift_cv
  from pennylane.gradients.gradient_transform import choose_trainable_params
  from pennylane.gradients.parameter_shift_cv import _grad_method_cv, _find_gradient_methods_cv, _transform_observable
label_desc: Use image node_id 5 for calling the TestParameterShiftLogic obj's underlying member method code with example usage: obj.test_no_trainable_params_tape() without return types