Skip to content

Commit

Permalink
[test]: test_periodogram_arr_error now catches errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mscaudill committed Sep 5, 2023
1 parent 0e14e04 commit 58e2c10
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,12 @@ def test_periodogram_arr_error():
return_onesided=True
axis = -1

# test that ValueError is raised by Numpy fft
# test that ValueError is raised by Numpy fft and np internal
# RuntimeWarnings
with pytest.raises(ValueError):

op_f, op_res = periodogram(arr, fs, nfft, window, axis, detrend,
scaling)
with pytest.warns(RuntimeWarning):
op_f, op_res = periodogram(arr, fs, nfft, window, axis, detrend,
scaling)


def test_welch_pros():
Expand Down

0 comments on commit 58e2c10

Please sign in to comment.