class_docstr: Test that the ResourcesOperation class is constructed correctly
docstr: Test that a not type error is raised if the class is
  initialized without a `resources` method.
docstr_tok: ["Test","that","a","not","type","error","is","raised","if","the","class","is","initialized","without","a","`","resources","`","method","."]
code: def test_raise_not_implemented_error(self):
      """Test that a not type error is raised if the class is
      initialized without a `resources` method."""
  
      class CustomOpNoResource(
          ResourcesOperation
      ):  # pylint: disable=too-few-public-methods
          num_wires = 2
  
      class CustomOPWithResources(
          ResourcesOperation
      ):  # pylint: disable=too-few-public-methods
          num_wires = 2
  
          def resources(self):
              return Resources(num_wires=self.num_wires)
  
      with pytest.raises(TypeError, match="Can't instantiate"):
          _ = CustomOpNoResource(
              wires=[0, 1]
          )  # pylint:disable=abstract-class-instantiated
  
      assert CustomOPWithResources(wires=[0, 1])
  
imports: from dataclasses import FrozenInstanceError
  from collections import defaultdict
  import pytest
  import pennylane
  from pennylane.operation import Operation
  from pennylane.tape import QuantumScript
  from pennylane.resource.resource import Resources, ResourcesOperation, _count_resources
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling the TestResourcesOperation obj's underlying member method code with example usage: obj.test_raise_not_implemented_error() and returns: Resources