shithub: aubio

ref: 4aad0dce38461ebe44b0ee90d10e49eacc2a11de
dir: /tests/python/run_all_tests/

View raw version
#! /usr/bin/python

# add ${src}/python and ${src}/python/aubio/.libs to python path
# so the script is runnable from a compiled source tree.
import sys, os

cur_dir = os.path.dirname(sys.argv[0])
sys.path.append(os.path.join(cur_dir,'..','..','python'))
sys.path.append(os.path.join(cur_dir,'..','..','python','aubio','.libs'))

import unittest

from glob import glob
modules_to_test = [i.split('.')[0] for i in glob('*.py')]

if __name__ == '__main__':
  for module in modules_to_test: 
    if module != 'all_tests': # (not actually needed)
      exec('from %s import *' % module)
  unittest.main()