class_docstr: Tests for the ``adjoint_jacobian`` method
class_docstr_tok: ["Tests","for","the","``","adjoint_jacobian","``","method"]
docstr: Test if a QuantumFunctionError is raised for a tape with measurements that are not
  expectation values
docstr_tok: ["Test","if","a","QuantumFunctionError","is","raised","for","a","tape","with","measurements","that","are","not","expectation","values"]
code: def test_not_expval(self, dev):
      """Test if a QuantumFunctionError is raised for a tape with measurements that are not
      expectation values"""
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(0.1, wires=0)
          qml.var(qml.PauliZ(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      with pytest.raises(
          qml.QuantumFunctionError,
          match="Adjoint differentiation method does",
      ):
          dev.adjoint_jacobian(tape)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 2 for calling the TestAdjointJacobian obj's underlying member method code with example usage: obj.test_not_expval(dev) without return types