class_docstr: Tests for the qfunc_transform decorator
class_docstr_tok: ["Tests","for","the","qfunc_transform","decorator"]
docstr: Test that qfunc transforms are not created during Sphinx builds
docstr_tok: ["Test","that","qfunc","transforms","are","not","created","during","Sphinx","builds"]
code: def test_sphinx_build(self, monkeypatch):
      """Test that qfunc transforms are not created during Sphinx builds"""
  
      def original_fn(tape):
          for op in tape:
              if op.name == "Hadamard":
                  qml.RZ(np.pi, wires=op.wires)
                  qml.RY(np.pi / 2, wires=op.wires)
              else:
                  op.queue()
  
      decorated_transform = qml.qfunc_transform(original_fn)
      assert original_fn is not decorated_transform
  
      monkeypatch.setenv("SPHINX_BUILD", "1")
  
      with pytest.warns(
          UserWarning, match="qfunc transformations have been disabled"
      ):
          decorated_transform = qml.qfunc_transform(original_fn)
  
      assert original_fn is decorated_transform
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 11 for calling the TestQFuncTransforms obj's underlying member method code with example usage: obj.test_sphinx_build(monkeypatch) without return types