source: tests/python/run_all_tests @ 5d012d0

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 5d012d0 was 66a150a2, checked in by Paul Brossier <piem@piem.org>, 16 years ago

move around files in tests/python according to src/ changes

  • Property mode set to 100755
File size: 872 bytes
Line 
1#! /usr/bin/python
2
3# add ${src}/python and ${src}/python/aubio/.libs to python path
4# so the script is runnable from a compiled source tree.
5import sys, os
6
7cur_dir = os.path.dirname(sys.argv[0])
8sys.path.append(os.path.join(cur_dir,'..','..','python'))
9sys.path.append(os.path.join(cur_dir,'..','..','python','aubio','.libs'))
10
11import unittest
12
13from glob import glob
14def list_of_test_files(path):
15  return [i.split('.')[0].replace('/','.') for i in glob(path)]
16
17modules_to_test  = []
18modules_to_test += list_of_test_files('src/*.py')
19modules_to_test += list_of_test_files('src/*/*.py')
20modules_to_test += list_of_test_files('examples/aubio*.py')
21modules_to_test += list_of_test_files('*.py')
22
23if __name__ == '__main__':
24  for module in modules_to_test:
25    if module != 'run_all_tests': # (not actually needed)
26      exec('from %s import *' % module)
27  unittest.main()
Note: See TracBrowser for help on using the repository browser.