Skip to content

Commit

Permalink
Test that silent estimates raise a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDiazGuerra committed Jan 26, 2024
1 parent 9ccebb2 commit cd7160d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_bsseval.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ def test_empty_input(is_framewise, is_sources, nb_win, nb_hop):
assert np.allclose(output, np.array([]))


def test_silent_input(references, estimates, is_framewise, is_sources, nb_win, nb_hop):
estimates = np.zeros(references.shape)

with pytest.warns(UserWarning):
metrics.bss_eval(
references,
estimates,
framewise_filters=is_framewise,
bsseval_sources_version=is_sources,
window=nb_win,
hop=nb_hop,
)


def test_metric(references, estimates, is_framewise, is_sources, nb_win, nb_hop):
metrics.bss_eval(
references,
Expand Down

0 comments on commit cd7160d

Please sign in to comment.