class_docstr: Test for validation and exceptions
docstr: Test that op transforms are not created during Sphinx builds
docstr_tok: ["Test","that","op","transforms","are","not","created","during","Sphinx","builds"]
code: def test_sphinx_build(self, monkeypatch):
      """Test that op transforms are not created during Sphinx builds"""
  
      @qml.op_transform
      def my_transform0(op):
          return op.name
  
      assert isinstance(my_transform0, qml.op_transform)
  
      monkeypatch.setenv("SPHINX_BUILD", "1")
  
      with pytest.warns(
          UserWarning,
          match="Operator transformations have been disabled",
      ):
  
          @qml.op_transform
          def my_transform1(op):
              return op.name
  
      assert not isinstance(my_transform1, qml.batch_transform)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.transforms.op_transforms import OperationTransformError
label_desc: Use image node_id 1 for calling the TestValidation obj's underlying member method code with example usage: obj.test_sphinx_build(monkeypatch) and returns: op, op