From 487899207a66a8b2f2867356d3f7ebd402eb1858 Mon Sep 17 00:00:00 2001 From: Brian McFee Date: Thu, 21 Mar 2024 14:42:18 -0400 Subject: [PATCH] catching more warnings in separation test --- tests/test_separation.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_separation.py b/tests/test_separation.py index 61944b4c..dd832f3e 100644 --- a/tests/test_separation.py +++ b/tests/test_separation.py @@ -113,10 +113,11 @@ def test_empty_input(metric): args = [np.array([]), np.array([]), 40, 20] with pytest.warns(UserWarning, match="estimated_sources is empty,"): - # First, test for a warning on empty audio data - metric(*args) - # And that the metric returns empty arrays - assert np.allclose(metric(*args), np.array([])) + with pytest.warns(UserWarning, match="reference_sources is empty,"): + # First, test for a warning on empty audio data + metric(*args) + # And that the metric returns empty arrays + assert np.allclose(metric(*args), np.array([])) @pytest.mark.parametrize(