class_docstr: Tests that the device uses a tracker attribute properly
class_docstr_tok: ["Tests","that","the","device","uses","a","tracker","attribute","properly"]
docstr: Tests that device update and records during tracking mode
docstr_tok: ["Tests","that","device","update","and","records","during","tracking","mode"]
code: def test_tracker_updated_in_execution_mode(self, device, mocker):
      """Tests that device update and records during tracking mode"""
  
      dev = device(1)
  
      if not dev.capabilities().get("supports_tracker", False):
          pytest.skip("Device does not support a tracker")
  
      @qml.qnode(dev, diff_method="parameter-shift")
      def circ():
          return qml.expval(qml.PauliX(wires=[0]))
  
      spy_update = mocker.spy(dev.tracker, "update")
      spy_record = mocker.spy(dev.tracker, "record")
  
      dev.tracker.active = False
      circ()
  
      assert spy_update.call_count == 0
      assert spy_record.call_count == 0
  
      dev.tracker.active = True
      circ()
  
      assert spy_update.call_count == 1
      assert spy_record.call_count == 1
  
imports: import pytest
  import pennylane
label_desc: Use image node_id 2 for calling the TestTracker obj's underlying member method code with example usage: obj.test_tracker_updated_in_execution_mode(device, mocker) and returns: qml