docstr: Verify that appropriate warnings are raised.
docstr_tok: ["Verify","that","appropriate","warnings","are","raised","."]
code: def test_warnings(self):
      """
      Verify that appropriate warnings are raised.
      """
      msg = "some peaks have a width of 0"
      with warns(PeakPropertyWarning, match=msg):
          # Case: rel_height is 0
          peak_widths([0, 1, 0], [1], rel_height=0)
      with warns(PeakPropertyWarning, match=msg):
          # Case: prominence is 0 and bases are identical
          peak_widths(
              [0, 1, 1, 1, 0],
              [2],
              prominence_data=(
                  np.array([0.0], np.float64),
                  np.array([2], np.intp),
                  np.array([2], np.intp),
              ),
          )
  
imports: from __future__ import division, print_function, absolute_import
  import copy
  import numpy
  from numpy.testing import assert_, assert_equal, assert_allclose, assert_array_equal
  import pytest
  from pytest import raises, warns
  from scipy._lib.six import xrange
  from scipy.signal._peak_finding import argrelmax, argrelmin, peak_prominences, peak_widths, _unpack_condition_args, find_peaks, find_peaks_cwt, _identify_ridge_lines
  from scipy.signal._peak_finding_utils import _local_maxima_1d, PeakPropertyWarning
label_desc: Use image node_id 5 for calling the TestPeakWidths obj's underlying member method code with example usage: obj.test_warnings() without return types