From: Paul Brossier Date: Tue, 26 Feb 2013 18:42:44 +0000 (-0500) Subject: moved test scripts to tests X-Git-Tag: 0.4.0-beta1~322 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8f177b749bbe92be7c43b89bca022582b642cb7f;p=aubio.git moved test scripts to tests --- diff --git a/python/a_weighting_test_simple.expected b/python/a_weighting_test_simple.expected deleted file mode 100644 index 6cd3ff3d..00000000 --- a/python/a_weighting_test_simple.expected +++ /dev/null @@ -1,2 +0,0 @@ - 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.00000000e-01 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 - 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.27870563e-01 2.58244342e-01 1.18719361e-01 -4.02623805e-02 -5.61812129e-02 -5.24739734e-02 -4.72329276e-02 -4.23394349e-02 -3.79219586e-02 -3.39473148e-02 -3.03724479e-02 -2.71574847e-02 -2.42664433e-02 -2.16669285e-02 -1.93297810e-02 -1.72287543e-02 -1.53402241e-02 -1.36429261e-02 -1.21177207e-02 -1.07473802e-02 diff --git a/python/build_osx b/python/build_osx deleted file mode 100755 index 3c53f87a..00000000 --- a/python/build_osx +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -set -e -set -x - -python setup.py clean build -export PYTHONPATH=./build/lib.macosx-10.6-intel-2.7:$PYTHONPATH -export DYLD_LIBRARY_PATH=../build/src -./run_all_tests --verbose diff --git a/python/c_weighting_test_simple.expected b/python/c_weighting_test_simple.expected deleted file mode 100644 index 70e2b159..00000000 --- a/python/c_weighting_test_simple.expected +++ /dev/null @@ -1,2 +0,0 @@ - 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.00000000e-01 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 - 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.08504281e-01 2.31621372e-01 1.38614617e-01 1.58040475e-02 -9.84900252e-04 -2.72686896e-03 -2.87772967e-03 -2.87932142e-03 -2.86783482e-03 -2.85529016e-03 -2.84270413e-03 -2.83016008e-03 -2.81766458e-03 -2.80521796e-03 -2.79282009e-03 -2.78047079e-03 -2.76816989e-03 -2.75591721e-03 -2.74371257e-03 -2.73155579e-03 diff --git a/python/env_osx b/python/env_osx new file mode 100755 index 00000000..3c53f87a --- /dev/null +++ b/python/env_osx @@ -0,0 +1,9 @@ +#! /bin/sh + +set -e +set -x + +python setup.py clean build +export PYTHONPATH=./build/lib.macosx-10.6-intel-2.7:$PYTHONPATH +export DYLD_LIBRARY_PATH=../build/src +./run_all_tests --verbose diff --git a/python/run_all_tests b/python/run_all_tests deleted file mode 100755 index dc2fbce4..00000000 --- a/python/run_all_tests +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env python - -if __name__ == '__main__': - import os, sys, unittest - def load_test(): - # get relevant files - curdir = os.path.dirname(sys.argv[0]) - if curdir == '': curdir = '.' - files = os.listdir(os.path.join(curdir, 'tests')) - modfiles = filter (lambda y: y.endswith('.py'), files) - modfiles = filter (lambda f: f.startswith('test_'), modfiles) - # get module names - modnames = map (lambda x: os.path.splitext(x)[0], modfiles) - # import them - modules = map (__import__, modnames) - # create a test suites from the imported module - load_from_module = unittest.defaultTestLoader.loadTestsFromModule - tests = map(load_from_module, modules) - return unittest.TestSuite(tests) - unittest.main(defaultTest = 'load_test') diff --git a/python/tests/a_weighting_test_simple.expected b/python/tests/a_weighting_test_simple.expected new file mode 100644 index 00000000..6cd3ff3d --- /dev/null +++ b/python/tests/a_weighting_test_simple.expected @@ -0,0 +1,2 @@ + 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.00000000e-01 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.27870563e-01 2.58244342e-01 1.18719361e-01 -4.02623805e-02 -5.61812129e-02 -5.24739734e-02 -4.72329276e-02 -4.23394349e-02 -3.79219586e-02 -3.39473148e-02 -3.03724479e-02 -2.71574847e-02 -2.42664433e-02 -2.16669285e-02 -1.93297810e-02 -1.72287543e-02 -1.53402241e-02 -1.36429261e-02 -1.21177207e-02 -1.07473802e-02 diff --git a/python/tests/c_weighting_test_simple.expected b/python/tests/c_weighting_test_simple.expected new file mode 100644 index 00000000..70e2b159 --- /dev/null +++ b/python/tests/c_weighting_test_simple.expected @@ -0,0 +1,2 @@ + 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.00000000e-01 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.08504281e-01 2.31621372e-01 1.38614617e-01 1.58040475e-02 -9.84900252e-04 -2.72686896e-03 -2.87772967e-03 -2.87932142e-03 -2.86783482e-03 -2.85529016e-03 -2.84270413e-03 -2.83016008e-03 -2.81766458e-03 -2.80521796e-03 -2.79282009e-03 -2.78047079e-03 -2.76816989e-03 -2.75591721e-03 -2.74371257e-03 -2.73155579e-03 diff --git a/python/tests/run_all_tests b/python/tests/run_all_tests new file mode 100755 index 00000000..ad18a92c --- /dev/null +++ b/python/tests/run_all_tests @@ -0,0 +1,20 @@ +#! /usr/bin/env python + +if __name__ == '__main__': + import os, sys, unittest + def load_test(): + # get relevant files + curdir = os.path.dirname(sys.argv[0]) + if curdir == '': curdir = '.' + files = os.listdir(curdir) + modfiles = filter (lambda y: y.endswith('.py'), files) + modfiles = filter (lambda f: f.startswith('test_'), modfiles) + # get module names + modnames = map (lambda x: os.path.splitext(x)[0], modfiles) + # import them + modules = map (__import__, modnames) + # create a test suites from the imported module + load_from_module = unittest.defaultTestLoader.loadTestsFromModule + tests = map(load_from_module, modules) + return unittest.TestSuite(tests) + unittest.main(defaultTest = 'load_test')