python/tests/test_specdesc.py: check for wrong values
authorPaul Brossier <piem@piem.org>
Sat, 14 May 2016 03:28:58 +0000 (05:28 +0200)
committerPaul Brossier <piem@piem.org>
Sat, 14 May 2016 03:28:58 +0000 (05:28 +0200)
python/tests/test_specdesc.py

index 6462eb9..c365f83 100755 (executable)
@@ -232,6 +232,15 @@ class aubio_specdesc(TestCase):
         rolloff = i 
         assert_equal (rolloff, o(c))
 
+class aubio_specdesc_wrong(TestCase):
+
+    def test_negative(self):
+        with self.assertRaises(ValueError):
+            o = specdesc("default", -10)
+
+    def test_unknown(self):
+        # FIXME should fail?
+        o = specdesc("unknown", 512)
 
 if __name__ == '__main__':
     from unittest import main