shithub: aubio

Download patch

ref: ad5eae80156e5f0f8112ac5bae11c4b3019bf738
parent: e99242a33df6cf2194cf4411475a194597f8a439
author: Paul Brossier <piem@piem.org>
date: Mon May 2 08:00:00 EDT 2016

python/tests/test_fft.py: clean up

--- a/python/tests/test_fft.py
+++ b/python/tests/test_fft.py
@@ -1,9 +1,8 @@
 #! /usr/bin/env python
 
-from numpy.testing import TestCase, run_module_suite
+from numpy.testing import TestCase
 from numpy.testing import assert_equal, assert_almost_equal
 from aubio import fvec, fft, cvec
-from numpy import array, shape
 from math import pi
 
 class aubio_fft_test_case(TestCase):
@@ -20,8 +19,9 @@
         timegrain = fvec(win_s)
         f = fft (win_s)
         fftgrain = f (timegrain)
-        assert_equal (shape(fftgrain.norm), (win_s/2+1,))
-        assert_equal (shape(fftgrain.phas), (win_s/2+1,))
+        del f
+        assert_equal (fftgrain.norm.shape, (win_s/2+1,))
+        assert_equal (fftgrain.phas.shape, (win_s/2+1,))
 
     def test_zeros(self):
         """ check the transform of zeros is all zeros """
@@ -157,7 +157,7 @@
         with self.assertRaises(ValueError):
             f.rdo(s)
 
-    def test_small_input_timegrain(self):
+    def test_small_input_fftgrain(self):
         win_s = 1024
         f = fft(win_s)
         s = cvec(16)
@@ -165,6 +165,5 @@
             f.rdo(s)
 
 if __name__ == '__main__':
-    from unittest import main
+    from nose2 import main
     main()
-