source: tests/python/run_all_tests @ 41f4c5b

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 41f4c5b was 4ecfee9, checked in by Paul Brossier <piem@piem.org>, 17 years ago

tests/python/run_all_tests: add a warning if list_of_test_files returns no matches, localaubio first

  • Property mode set to 100755
File size: 676 bytes
Line 
1#! /usr/bin/python
2
3import unittest
4
5from glob import glob
6def list_of_test_files(path):
7  matches = glob(path)
8  if not matches: print "WARNING: no matches for %s" % path
9  return [i.split('.')[0].replace('/','.') for i in matches]
10
11modules_to_test  = []
12modules_to_test += ['localaubio']
13modules_to_test += list_of_test_files('src/*.py')
14modules_to_test += list_of_test_files('src/*/*.py')
15modules_to_test += list_of_test_files('examples/aubio*.py')
16modules_to_test += list_of_test_files('*.py')
17
18if __name__ == '__main__':
19  for module in modules_to_test:
20    if module != 'run_all_tests': # (not actually needed)
21      exec('from %s import *' % module)
22  unittest.main()
Note: See TracBrowser for help on using the repository browser.