class_docstr: Tests for drawing mid-circuit measurements and classical conditions.
docstr: Test that a circuit containing mid-circuit measurements is transformed by the drawer
  to use deferred measurements if the device uses the new device API.
docstr_tok: ["Test","that","a","circuit","containing","mid-circuit","measurements","is","transformed","by","the","drawer","to","use","deferred","measurements","if","the","device","uses","the","new","device","API","."]
code: def test_qnode_mid_circuit_measurement_not_deferred(
      self, device_name, mocker
  ):
      """Test that a circuit containing mid-circuit measurements is transformed by the drawer
      to use deferred measurements if the device uses the new device API.
      """
      dev = qml.device(device_name)
  
      @qml.qnode(dev)
      def circ():
          qml.PauliX(0)
          qml.measure(0)
          return qml.probs(wires=0)
  
      draw_qnode = qml.draw(circ)
      spy = mocker.spy(qml.defer_measurements, "_transform")
  
      drawing = draw_qnode()
      spy.assert_not_called()
  
      assert drawing == "0: ──X──┤↗├─┤  Probs"
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.drawer import draw
label_desc: Use image node_id 1 for calling the TestMidCircuitMeasurements obj's underlying member method code with example usage: obj.test_qnode_mid_circuit_measurement_not_deferred(device_name, mocker) and returns: qml