class_docstr: Test that the expval transform is applied correctly
class_docstr_tok: ["Test","that","the","expval","transform","is","applied","correctly"]
docstr: Test that an exception is raised when the decorated QNode does not
  return shadows
docstr_tok: ["Test","that","an","exception","is","raised","when","the","decorated","QNode","does","not","return","shadows"]
code: def test_non_shadow_error(self):
      """Test that an exception is raised when the decorated QNode does not
      return shadows"""
      dev = qml.device("default.qubit", wires=1, shots=100)
  
      @partial(qml.shadows.shadow_expval, H=qml.PauliZ(0))
      @qml.qnode(dev)
      def circuit():
          qml.Hadamard(0)
          return qml.expval(qml.PauliZ(0))
  
      msg = "Tape measurement must be ClassicalShadowMP, got 'ExpectationMP'"
      with pytest.raises(ValueError, match=msg):
          circuit()
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.shadows.transforms import _replace_obs
label_desc: Use image node_id 3 for calling the TestExpvalTransform obj's underlying member method code with example usage: obj.test_non_shadow_error() and returns: qml