class_docstr: Tests of input validation and output correctness of function `generate_shift_rule`.
class_docstr_tok: ["Tests","of","input","validation","and","output","correctness","of","function","`","generate_shift_rule","`","."]
docstr: Tests ValueError is raised if input frequency spectrum is non positive or non unique.
code: def test_invalid_frequency_spectrum(self):
      """Tests ValueError is raised if input frequency spectrum is non positive or non unique."""
  
      non_positive_frequency_spectrum = (-1, 1)
      non_unique_frequency_spectrum = (1, 2, 2, 3)
  
      assert pytest.raises(
          ValueError, _get_shift_rule, non_positive_frequency_spectrum
      )
      assert pytest.raises(
          ValueError, _get_shift_rule, non_unique_frequency_spectrum
      )
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.gradients.general_shift_rules import eigvals_to_frequencies, frequencies_to_period, generate_shift_rule, _get_shift_rule, generate_multi_shift_rule, generate_shifted_tapes, generate_multishifted_tapes, _iterate_shift_rule_with_multipliers
label_desc: Use image node_id 1 for calling the TestGenerateShiftRule obj's underlying member method code with example usage: obj.test_invalid_frequency_spectrum() without return types