shithub: aubio

Download patch

ref: 437ef0789c8c0c8ad782874424433c7d5fdbeef9
parent: 6014dc0766ef3c1b04e7023cabcce80936c134e9
author: Paul Brossier <piem@piem.org>
date: Sat Apr 30 02:22:58 EDT 2016

python/tests/test_fft.py: clean up, add tests for f.rdo input size

--- a/python/tests/test_fft.py
+++ b/python/tests/test_fft.py
@@ -140,17 +140,29 @@
         win_s = 1024
         f = fft(win_s)
         t = fvec(win_s + 1)
-        print f(t)
         with self.assertRaises(ValueError):
-            print f(t)
+            f(t)
 
     def test_small_input_timegrain(self):
         win_s = 1024
         f = fft(win_s)
         t = fvec(1)
-        print f(t).phas
         with self.assertRaises(ValueError):
             f(t)
+
+    def test_large_input_fftgrain(self):
+        win_s = 1024
+        f = fft(win_s)
+        s = cvec(win_s + 1)
+        with self.assertRaises(ValueError):
+            f.rdo(s)
+
+    def test_small_input_timegrain(self):
+        win_s = 1024
+        f = fft(win_s)
+        s = cvec(16)
+        with self.assertRaises(ValueError):
+            f.rdo(s)
 
 if __name__ == '__main__':
     from unittest import main