class_docstr: Test that the expval estimation is correct for a variety of observables
docstr: 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)
      bits, recipes = circuit()
      shadow = ClassicalShadow(bits, recipes)
  
      H = qml.Hadamard(0) @ qml.Hadamard(2)
  
      msg = (
          "Observable must be a linear combination of Pauli observables"
      )
      with pytest.raises(ValueError, match=msg):
          shadow.expval(H, k=10)
  
imports: import pytest
  import numpy
  import pennylane
  import pennylane.numpy
  from pennylane.shadows import ClassicalShadow, median_of_means, pauli_expval
label_desc: Use image node_id 3 for calling the TestExpvalEstimation obj's underlying member method code with example usage: obj.test_non_pauli_error() without return types