class_docstr: Unit tests for the preprocessing method.
class_docstr_tok: ["Unit","tests","for","the","preprocessing","method","."]
docstr: Test that preprocessing request grad on execution and says to use the device gradient if adjoint is requested.
docstr_tok: ["Test","that","preprocessing","request","grad","on","execution","and","says","to","use","the","device","gradient","if","adjoint","is","requested","."]
code: def test_config_choices_for_adjoint(self):
      """Test that preprocessing request grad on execution and says to use the device gradient if adjoint is requested."""
      dev = DefaultQubit()
  
      config = ExecutionConfig(
          gradient_method="adjoint",
          use_device_gradient=None,
          grad_on_execution=None,
      )
  
      _, new_config = dev.preprocess(config)
  
      assert new_config.use_device_gradient
      assert new_config.grad_on_execution
  
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 2 for calling the TestPreprocessing obj's underlying member method code with example usage: obj.test_config_choices_for_adjoint() without return types