class_docstr: Tests for the validate measurements transform.
class_docstr_tok: ["Tests","for","the","validate","measurements","transform","."]
docstr: Test that a circuit with finite shots containing only SampleMeasurements works
docstr_tok: ["Test","that","a","circuit","with","finite","shots","containing","only","SampleMeasurements","works"]
code: def test_only_sample_measurements(self, measurements):
      """Test that a circuit with finite shots containing only SampleMeasurements works"""
      tape = QuantumScript([], measurements, shots=100)
      validate_measurements(tape, sample_measurements=lambda obj: True)
  
imports: import pytest
  import pennylane
  from pennylane.operation import Operation
  from pennylane.tape import QuantumScript
  from pennylane import DeviceError
  from pennylane.devices.preprocess import no_sampling, validate_device_wires, validate_multiprocessing_workers, validate_adjoint_trainable_params, _operator_decomposition_gen, decompose, validate_observables, validate_measurements
label_desc: Use image node_id 2 for calling the TestValidateMeasurements obj's underlying member method code with example usage: obj.test_only_sample_measurements(measurements) without return types