class_docstr: Tests general operations.
class_docstr_tok: ["Tests","general","operations","."]
docstr: Test that a variety of operations produce a rectangle across relevant wires
  and a correct label text.
code: def test_general_operations(self, op):
      """Test that a variety of operations produce a rectangle across relevant wires
      and a correct label text."""
  
      with qml.queuing.AnnotatedQueue() as q_tape:
          qml.apply(op)
  
      tape = QuantumScript.from_queue(q_tape)
      _, ax = tape_mpl(tape)
  
      num_wires = len(op.wires)
      assert ax.texts[num_wires].get_text() == op.label()
  
      assert isinstance(ax.patches[0], mpl.patches.FancyBboxPatch)
      assert ax.patches[0].get_x() == -self.width / 2.0
      assert ax.patches[0].get_y() == -self.width / 2.0
      assert ax.patches[0].get_width() == self.width
      assert ax.patches[0].get_height() == num_wires - 1 + self.width
  
      plt.close()
  
imports: import pytest
  import pennylane
  from pennylane.drawer import tape_mpl
  from pennylane.tape import QuantumScript
label_desc: Use image node_id 1 for calling the TestGeneralOperations obj's underlying member method code with example usage: obj.test_general_operations(op) without return types