From 66a150a25930213535541669ac0afa76ef216d9d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 30 Nov 2007 19:39:19 +0100 Subject: [PATCH] move around files in tests/python according to src/ changes --- tests/python/run_all_tests | 5 ++++- tests/python/src/__init__.py | 0 tests/python/{ => src}/cvec.py | 0 tests/python/{ => src}/fvec.py | 0 tests/python/src/onset/__init__.py | 0 tests/python/src/pitch/__init__.py | 0 tests/python/{ => src/pitch}/pitchdetection.py | 0 tests/python/src/spectral/__init__.py | 0 tests/python/{ => src/spectral}/fft.py | 0 tests/python/{ => src/spectral}/filterbank.py | 3 ++- tests/python/{ => src/spectral}/filterbank_mfcc.txt | 0 tests/python/{ => src/spectral}/phasevoc.py | 0 tests/python/src/temporal/__init__.py | 0 tests/python/src/utils/__init__.py | 0 tests/python/{ => src/utils}/hist.py | 0 15 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/python/src/__init__.py rename tests/python/{ => src}/cvec.py (100%) rename tests/python/{ => src}/fvec.py (100%) create mode 100644 tests/python/src/onset/__init__.py create mode 100644 tests/python/src/pitch/__init__.py rename tests/python/{ => src/pitch}/pitchdetection.py (100%) create mode 100644 tests/python/src/spectral/__init__.py rename tests/python/{ => src/spectral}/fft.py (100%) rename tests/python/{ => src/spectral}/filterbank.py (97%) rename tests/python/{ => src/spectral}/filterbank_mfcc.txt (100%) rename tests/python/{ => src/spectral}/phasevoc.py (100%) create mode 100644 tests/python/src/temporal/__init__.py create mode 100644 tests/python/src/utils/__init__.py rename tests/python/{ => src/utils}/hist.py (100%) diff --git a/tests/python/run_all_tests b/tests/python/run_all_tests index e2f8065f..f077a171 100755 --- a/tests/python/run_all_tests +++ b/tests/python/run_all_tests @@ -14,8 +14,11 @@ from glob import glob def list_of_test_files(path): return [i.split('.')[0].replace('/','.') for i in glob(path)] -modules_to_test = list_of_test_files('*.py') +modules_to_test = [] +modules_to_test += list_of_test_files('src/*.py') +modules_to_test += list_of_test_files('src/*/*.py') modules_to_test += list_of_test_files('examples/aubio*.py') +modules_to_test += list_of_test_files('*.py') if __name__ == '__main__': for module in modules_to_test: diff --git a/tests/python/src/__init__.py b/tests/python/src/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/cvec.py b/tests/python/src/cvec.py similarity index 100% rename from tests/python/cvec.py rename to tests/python/src/cvec.py diff --git a/tests/python/fvec.py b/tests/python/src/fvec.py similarity index 100% rename from tests/python/fvec.py rename to tests/python/src/fvec.py diff --git a/tests/python/src/onset/__init__.py b/tests/python/src/onset/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/src/pitch/__init__.py b/tests/python/src/pitch/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/pitchdetection.py b/tests/python/src/pitch/pitchdetection.py similarity index 100% rename from tests/python/pitchdetection.py rename to tests/python/src/pitch/pitchdetection.py diff --git a/tests/python/src/spectral/__init__.py b/tests/python/src/spectral/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/fft.py b/tests/python/src/spectral/fft.py similarity index 100% rename from tests/python/fft.py rename to tests/python/src/spectral/fft.py diff --git a/tests/python/filterbank.py b/tests/python/src/spectral/filterbank.py similarity index 97% rename from tests/python/filterbank.py rename to tests/python/src/spectral/filterbank.py index 3b04d290..44d6a026 100644 --- a/tests/python/filterbank.py +++ b/tests/python/src/spectral/filterbank.py @@ -91,10 +91,11 @@ class filterbank_test_case(unittest.TestCase): def testmfcc_channels(self): """ check the values of each filters in the mfcc filterbank """ + import os.path self.filterbank = new_aubio_filterbank_mfcc(n_filters, win_size, samplerate, 0., samplerate) filterbank_mfcc = [ [float(f) for f in line.strip().split()] - for line in open('filterbank_mfcc.txt').readlines()] + for line in open(os.path.join('src','spectral','filterbank_mfcc.txt')).readlines()] for channel in range(n_filters): vec = aubio_filterbank_getchannel(self.filterbank,channel) for index in range(win_size): diff --git a/tests/python/filterbank_mfcc.txt b/tests/python/src/spectral/filterbank_mfcc.txt similarity index 100% rename from tests/python/filterbank_mfcc.txt rename to tests/python/src/spectral/filterbank_mfcc.txt diff --git a/tests/python/phasevoc.py b/tests/python/src/spectral/phasevoc.py similarity index 100% rename from tests/python/phasevoc.py rename to tests/python/src/spectral/phasevoc.py diff --git a/tests/python/src/temporal/__init__.py b/tests/python/src/temporal/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/src/utils/__init__.py b/tests/python/src/utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/python/hist.py b/tests/python/src/utils/hist.py similarity index 100% rename from tests/python/hist.py rename to tests/python/src/utils/hist.py -- 2.26.2