shithub: aubio

Download patch

ref: 4c01c0fe325947e7a0a6141f28755f4995959b3e
parent: 474f297fb978bf8247e820d51a425fb8d960ff5c
author: Paul Brossier <piem@piem.org>
date: Fri Dec 25 00:09:41 EST 2009

test_*.py: use aubio module

--- a/interfaces/python/aubio/__init__.py
+++ b/interfaces/python/aubio/__init__.py
@@ -1,4 +1,5 @@
 import numpy
+from _aubio import *
 
 class fvec(numpy.ndarray):
 
--- a/interfaces/python/test_aubio.py
+++ b/interfaces/python/test_aubio.py
@@ -1,13 +1,10 @@
 from numpy.testing import TestCase, run_module_suite
-from numpy.testing import assert_equal
-from _aubio import *
-from numpy import array
 
 class aubiomodule_test_case(TestCase):
 
-  def setUp(self):
+  def test_import(self):
     """ try importing aubio """
-
+    import aubio 
 
 if __name__ == '__main__':
   from unittest import main
--- a/interfaces/python/test_cvec.py
+++ b/interfaces/python/test_cvec.py
@@ -1,6 +1,6 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
-from _aubio import cvec
+from aubio import cvec
 from numpy import array, shape, pi
 
 class aubio_cvec_test_case(TestCase):
--- a/interfaces/python/test_fft.py
+++ b/interfaces/python/test_fft.py
@@ -1,8 +1,7 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
 # WARNING: numpy also has an fft object
-from _aubio import fft, cvec
-from aubio import fvec
+from aubio import fvec, fft, cvec
 from numpy import array, shape
 from math import pi
 
--- a/interfaces/python/test_filter.py
+++ b/interfaces/python/test_filter.py
@@ -1,7 +1,6 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
-from _aubio import *
-from aubio import fvec
+from aubio import fvec, digital_filter
 from numpy import array
 
 def array_from_text_file(filename, dtype = 'float'):
--- a/interfaces/python/test_filterbank.py
+++ b/interfaces/python/test_filterbank.py
@@ -1,8 +1,7 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
 from numpy import array, shape
-from _aubio import *
-#from aubio import cvec
+from aubio import cvec, filterbank
 
 class aubio_filter_test_case(TestCase):
 
--- a/interfaces/python/test_fvec.py
+++ b/interfaces/python/test_fvec.py
@@ -1,7 +1,6 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
-from _aubio import *
-from aubio import fvec
+from aubio import fvec, zero_crossing_rate, alpha_norm, min_removal
 from numpy import array, shape
 
 class aubio_fvec_test_case(TestCase):
--- a/interfaces/python/test_onsetdetection.py
+++ b/interfaces/python/test_onsetdetection.py
@@ -1,7 +1,7 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
 # WARNING: numpy also has an fft object
-from _aubio import specdesc, cvec
+from aubio import specdesc, cvec
 from numpy import array, shape, arange, zeros, log
 from math import pi
 
--- a/interfaces/python/test_phasevoc.py
+++ b/interfaces/python/test_phasevoc.py
@@ -1,7 +1,6 @@
 from numpy.testing import TestCase, run_module_suite
 from numpy.testing import assert_equal, assert_almost_equal
-from aubio import fvec
-from _aubio import *
+from aubio import fvec, cvec, pvoc
 from numpy import array, shape
 
 class aubio_pvoc_test_case(TestCase):