From 6589a98e89875d4d56a856983146d6793e1c78e8 Mon Sep 17 00:00:00 2001 From: Brian McFee Date: Thu, 21 Mar 2024 14:45:07 -0400 Subject: [PATCH] blacking tests --- tests/test_melody.py | 3 ++- tests/test_segment.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_melody.py b/tests/test_melody.py index 584a60cb..60e7f796 100644 --- a/tests/test_melody.py +++ b/tests/test_melody.py @@ -185,7 +185,7 @@ def test_to_cent_voicing(): # We can ignore this warning, which occurs when testing with all-zeros reward -@pytest.mark.filterwarnings("ignore:Reference melody has no voiced frames") +@pytest.mark.filterwarnings("ignore:Reference melody has no voiced frames") def test_continuous_voicing_metrics(): ref_time = np.array([0.0, 0.1, 0.2, 0.3]) ref_freq = np.array([440.0, 0.0, 220.0, 220.0]) @@ -335,6 +335,7 @@ def test_continuous_voicing_metrics(): for metric in actual_scores: assert np.isclose(actual_scores[metric], expected_scores[metric]) + def test_voicing_measures_empty(): # We need a special test for voicing_measures because it only takes 2 args with pytest.warns() as w: diff --git a/tests/test_segment.py b/tests/test_segment.py index 7b39af4c..8c19618f 100644 --- a/tests/test_segment.py +++ b/tests/test_segment.py @@ -101,10 +101,10 @@ def test_segment_boundary_deviation_perfect(): ) def test_segment_structure_empty(metric): with pytest.warns(UserWarning, match="Reference intervals are empty"): - metric(np.zeros((0, 2)), [], np.array([[0, 1]]), ['foo']) + metric(np.zeros((0, 2)), [], np.array([[0, 1]]), ["foo"]) with pytest.warns(UserWarning, match="Estimated intervals are empty"): - metric(np.array([[0, 1]]), ['foo'], np.zeros((0, 2)), []) + metric(np.array([[0, 1]]), ["foo"], np.zeros((0, 2)), []) with pytest.warns(UserWarning, match="intervals are empty"): empty_intervals = np.zeros((0, 2))