shithub: aubio

Download patch

ref: b41672ced666f5032f12ca445a324fe8fc6c5a7b
parent: f7af440a1cf793f1b6789ab0b06e4687f7d632b9
author: Paul Brossier <piem@piem.org>
date: Sat Nov 17 14:47:12 EST 2018

[test] improve coverage of filters

--- a/python/tests/test_filter.py
+++ b/python/tests/test_filter.py
@@ -77,6 +77,16 @@
         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):