From: Paul Brossier Date: Sat, 14 May 2016 03:21:01 +0000 (+0200) Subject: python/tests/test_filterbank.py: check for wrong values X-Git-Tag: 0.4.4~300^2~49 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=ed938a2fe635b0f432f897f863e83dd9532f2a08 python/tests/test_filterbank.py: check for wrong values --- diff --git a/python/tests/test_filterbank.py b/python/tests/test_filterbank.py index 46fd97e8..bce832e3 100755 --- a/python/tests/test_filterbank.py +++ b/python/tests/test_filterbank.py @@ -61,6 +61,14 @@ class aubio_filterbank_test_case(TestCase): f.set_mel_coeffs_slaney(16000) assert_almost_equal ( expected, f.get_coeffs() ) +class aubio_filterbank_wrong_values(TestCase): + + def test_negative_window(self): + self.assertRaises(ValueError, filterbank, 40, -20) + + def test_negative_filters(self): + self.assertRaises(RuntimeError, filterbank, -40, 1024) + def test_filterbank_long_cvec(self): f = filterbank(40, 512) with self.assertRaises(ValueError):