class_docstr: Test preprocess produces output that can be executed by the device.
class_docstr_tok: ["Test","preprocess","produces","output","that","can","be","executed","by","the","device","."]
docstr: Test that preprocessing fails if adjoint differentiation is requested and an
  invalid tape is used
docstr_tok: ["Test","that","preprocessing","fails","if","adjoint","differentiation","is","requested","and","an","invalid","tape","is","used"]
code: def test_preprocess_invalid_tape_adjoint(
      self, ops, measurement, message
  ):
      """Test that preprocessing fails if adjoint differentiation is requested and an
      invalid tape is used"""
      qs = qml.tape.QuantumScript(ops, measurement)
      execution_config = qml.devices.ExecutionConfig(
          gradient_method="adjoint"
      )
  
      program, _ = qml.device("default.qubit").preprocess(
          execution_config
      )
      with pytest.raises(qml.DeviceError, match=message):
          program([qs])
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices import DefaultQubit, ExecutionConfig
  from pennylane.devices.default_qubit import stopping_condition
label_desc: Use image node_id 10 for calling the TestPreprocessingIntegration obj's underlying member method code with example usage: obj.test_preprocess_invalid_tape_adjoint(ops, measurement, message) without return types