From b41672ced666f5032f12ca445a324fe8fc6c5a7b Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 17 Nov 2018 19:47:12 +0100 Subject: [PATCH] [test] improve coverage of filters --- python/tests/test_filter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/tests/test_filter.py b/python/tests/test_filter.py index 6a7a0ded..72f5f4dd 100755 --- a/python/tests/test_filter.py +++ b/python/tests/test_filter.py @@ -77,6 +77,16 @@ class aubio_filter_test_case(TestCase): with self.assertRaises(ValueError): f.set_biquad(0., 0., 0, 0., 0.) + def test_all_available_presets(self): + f = digital_filter(7) + for sr in [8000, 11025, 16000, 22050, 24000, 32000, + 44100, 48000, 88200, 96000, 192000]: + f.set_a_weighting(sr) + f = digital_filter(5) + for sr in [8000, 11025, 16000, 22050, 24000, 32000, + 44100, 48000, 88200, 96000, 192000]: + f.set_c_weighting(sr) + class aubio_filter_wrong_params(TestCase): def test_negative_order(self): -- 2.11.0