From ed938a2fe635b0f432f897f863e83dd9532f2a08 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 14 May 2016 05:21:01 +0200 Subject: [PATCH] python/tests/test_filterbank.py: check for wrong values --- python/tests/test_filterbank.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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): -- 2.11.0