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 in ['finite-diff', 'spsa'] fails for all interfaces and
  the return_types State and DensityMatrix.
docstr_tok: ["Test","diff_method","in","[","'finite-diff","'",",","'spsa","'","]","fails","for","all","interfaces","and","the","return_types","State","and","DensityMatrix","."]
code: def test_all_finitediff_state(
      self, interface, return_type, shots, wire_specs, diff_method
  ):
      """Test diff_method in ['finite-diff', 'spsa'] fails for all interfaces and
      the return_types State and DensityMatrix."""
  
      # this error message is a bit cryptic, but it's consistent across
      # all the interfaces
      msg = "state\\(wires=\\[0?\\]\\)\\ is\\ not\\ in\\ list"
  
      complex = return_type == "StateVector"
  
      with pytest.raises(ValueError, match=msg):
          circuit = get_qnode(
              interface, diff_method, return_type, shots, wire_specs
          )
          x = get_variable(interface, wire_specs, complex=complex)
  
          if shots is not None:
              with pytest.warns(
                  UserWarning, match="unaffected by sampling"
              ):
                  compute_gradient(
                      x,
                      interface,
                      circuit,
                      return_type,
                      complex=complex,
                  )
          else:
              compute_gradient(
                  x, interface, circuit, return_type, complex=complex
              )
  
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 11 for calling the TestSupportedConfs obj's underlying member method code with example usage: obj.test_all_finitediff_state(interface, return_type, shots, wire_specs, diff_method) without return types