From: Paul Brossier Date: Sat, 17 Nov 2018 18:47:12 +0000 (+0100) Subject: [test] improve coverage of filters X-Git-Tag: 0.4.8~28 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b41672ced666f5032f12ca445a324fe8fc6c5a7b;p=aubio.git [test] improve coverage of filters --- 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):