class_docstr: Test that the supported configurations in the documentation
  matches the supported configurations in the code.
  
  Also test that the supported configurations do not raise any errors and
  the unsupported configurations raise the expected errors or otherwise
  behave as expected.
  
  These tests do not test for correctness.
class_docstr_tok: ["Test","that","the","supported","configurations","in","the","documentation","matches","the","supported","configurations","in","the","code",".","Also","test","that","the","supported","configurations","do","not","raise","any","errors","and","the","unsupported","configurations","raise","the","expected","errors","or","otherwise","behave","as","expected",".","These","tests","do","not","test","for","correctness","."]
docstr: Test diff_method=adjoint raises an error for non-expectation
  measurements for all interfaces
docstr_tok: ["Test","diff_method=adjoint","raises","an","error","for","non-expectation","measurements","for","all","interfaces"]
code: def test_all_adjoint_nonexp(
      self, interface, return_type, shots, wire_specs
  ):
      """Test diff_method=adjoint raises an error for non-expectation
      measurements for all interfaces"""
  
      circuit = get_qnode(
          interface, "adjoint", return_type, shots, wire_specs
      )
      x = get_variable(interface, wire_specs, complex=True)
  
      if shots is not None:
          with pytest.raises(qml.DeviceError):
              compute_gradient(x, interface, circuit, return_type)
      elif (
          return_type == ObservableReturnTypes.Probability
          and interface == "tf"
      ):
          with pytest.raises(Exception):
              # tensorflow.python.framework.errors_impl.InvalidArgumentError
              # TODO: figure out why
              compute_gradient(x, interface, circuit, return_type)
      else:
          compute_gradient(x, interface, circuit, return_type)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import QuantumFunctionError
  from pennylane.measurements import Probability, Expectation, Variance, Sample, VnEntropy, MutualInfo
  from pennylane.measurements.measurements import ObservableReturnTypes
label_desc: Use image node_id 6 for calling the TestSupportedConfs obj's underlying member method code with example usage: obj.test_all_adjoint_nonexp(interface, return_type, shots, wire_specs) without return types