From aba027955f6ee703262f7bab2c90f46efb8d9352 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 14 May 2016 05:28:58 +0200 Subject: [PATCH] python/tests/test_specdesc.py: check for wrong values --- python/tests/test_specdesc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/tests/test_specdesc.py b/python/tests/test_specdesc.py index 6462eb9f..c365f830 100755 --- a/python/tests/test_specdesc.py +++ b/python/tests/test_specdesc.py @@ -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 -- 2.11.0