class_docstr: Test for the properties
class_docstr_tok: ["Test","for","the","properties"]
docstr: Test that MP.name and MP.data are deprecated.
docstr_tok: ["Test","that","MP.name","and","MP.data","are","deprecated","."]
code: def test_name_and_data_are_deprecated(self):
      """Test that MP.name and MP.data are deprecated."""
      mp = qml.expval(qml.PauliZ(0))
      with pytest.warns(
          qml.PennyLaneDeprecationWarning,
          match="MeasurementProcess.name is deprecated",
      ):
          _ = mp.name
      with pytest.warns(
          qml.PennyLaneDeprecationWarning,
          match="MeasurementProcess.data is deprecated",
      ):
          _ = mp.data
  
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 9 for calling the TestProperties obj's underlying member method code with example usage: obj.test_name_and_data_are_deprecated() without return types