class_docstr: Test the shadow_expval measurement process forward pass
class_docstr_tok: ["Test","the","shadow_expval","measurement","process","forward","pass"]
docstr: Test that an error is raised when a non-Pauli observable is passed
docstr_tok: ["Test","that","an","error","is","raised","when","a","non-Pauli","observable","is","passed"]
code: def test_non_pauli_error(self):
      """Test that an error is raised when a non-Pauli observable is passed"""
      circuit = hadamard_circuit(3)
  
      msg = (
          "Observable must be a linear combination of Pauli observables"
      )
      with pytest.raises(ValueError, match=msg):
          circuit(qml.Hadamard(0) @ qml.Hadamard(2))
  
imports: import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import Shots
label_desc: Use image node_id 3 for calling the TestExpvalForward obj's underlying member method code with example usage: obj.test_non_pauli_error() without return types