Skip to content

Commit

Permalink
revised window_bandwidth test
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Oct 3, 2016
1 parent ed4b036 commit 72a6d3a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,9 @@ def test_window_bandwidth():
librosa.filters.window_bandwidth(scipy.signal.hann))


@raises(ValueError)
def test_window_bandwidth_missing():
warnings.resetwarnings()
with warnings.catch_warnings(record=True) as out:
x = librosa.filters.window_bandwidth('unknown_window')
eq_(x, 1)
assert len(out) > 0
assert out[0].category is UserWarning
assert 'Unknown window function' in str(out[0].message)
librosa.filters.window_bandwidth('made up window name')


def binstr(m):
Expand Down

0 comments on commit 72a6d3a

Please sign in to comment.