projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3122327
)
python/tests/test_filterbank.py: check for wrong values
author
Paul Brossier
<piem@piem.org>
Sat, 14 May 2016 03:21:01 +0000
(
05:21
+0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 14 May 2016 03:21:01 +0000
(
05:21
+0200)
python/tests/test_filterbank.py
patch
|
blob
|
history
diff --git
a/python/tests/test_filterbank.py
b/python/tests/test_filterbank.py
index
46fd97e
..
bce832e
100755
(executable)
--- 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):