source: tests/python/run_all_tests @ b14107f

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since b14107f 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
RevLine 
[229ea56]1#! /usr/bin/python
2
3import unittest
4
[647a2d8]5from glob import glob
[031b1f9]6def list_of_test_files(path):
[4ecfee9]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]
[031b1f9]10
[66a150a2]11modules_to_test  = []
[4ecfee9]12modules_to_test += ['localaubio']
[66a150a2]13modules_to_test += list_of_test_files('src/*.py')
14modules_to_test += list_of_test_files('src/*/*.py')
[031b1f9]15modules_to_test += list_of_test_files('examples/aubio*.py')
[66a150a2]16modules_to_test += list_of_test_files('*.py')
[229ea56]17
18if __name__ == '__main__':
[647a2d8]19  for module in modules_to_test:
[031b1f9]20    if module != 'run_all_tests': # (not actually needed)
[647a2d8]21      exec('from %s import *' % module)
[229ea56]22  unittest.main()
Note: See TracBrowser for help on using the repository browser.