python/tests/test_source.py: really fail wrong hop size test
authorPaul Brossier <piem@piem.org>
Fri, 22 Mar 2013 17:33:35 +0000 (12:33 -0500)
committerPaul Brossier <piem@piem.org>
Fri, 22 Mar 2013 17:33:35 +0000 (12:33 -0500)
python/tests/test_source.py

index d26e4e787d9eb4fc7602e6b77ed50a6c61eecc01..b96bb919d20510fea16d12e011ff41a61bce87d7 100755 (executable)
@@ -54,8 +54,12 @@ class aubio_source_test_case(TestCase):
 
     def test_wrong_hop_size(self):
         for p in list_of_sounds:
-            f = source(p, 0, -1)
-            print f.hop_size
+            try:
+                f = source(p, 0, -1)
+            except Exception, e:
+                print e
+            else:
+                self.fail('does not fail with wrong hop_size %d' % f.hop_size)
 
     def test_zero_hop_size(self):
         for p in list_of_sounds: