class_docstr: Test for the properties
class_docstr_tok: ["Test","for","the","properties"]
docstr: An observable with no eigenvalues defined should cause
  the eigvals method to return a NotImplementedError
docstr_tok: ["An","observable","with","no","eigenvalues","defined","should","cause","the","eigvals","method","to","return","a","NotImplementedError"]
code: def test_observable_with_no_eigvals(self):
      """An observable with no eigenvalues defined should cause
      the eigvals method to return a NotImplementedError"""
      obs = qml.NumberOperator(wires=0)
      m = qml.expval(op=obs)
      with pytest.raises(qml.operation.EigvalsUndefinedError):
          _ = m.eigvals()
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.measurements import ClassicalShadowMP, Counts, CountsMP, Expectation, ExpectationMP, MeasurementProcess, MeasurementTransform, MeasurementValue, MidMeasure, MidMeasureMP, MutualInfoMP, PurityMP, Probability, ProbabilityMP, Sample, SampleMeasurement, SampleMP, ShadowExpvalMP, Shots, State, StateMeasurement, StateMP, Variance, VarianceMP, VnEntropyMP, expval, sample, var
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.queuing import AnnotatedQueue
  from pennylane.wires import Wires
label_desc: Use image node_id 6 for calling the TestProperties obj's underlying member method code with example usage: obj.test_observable_with_no_eigvals() without return types