source:
tests/python/run_all_tests
@
2d1d5ce
Last change on this file since 2d1d5ce was 4ecfee9, checked in by , 17 years ago | |
---|---|
|
|
File size: 676 bytes |
Rev | Line | |
---|---|---|
[229ea56] | 1 | #! /usr/bin/python |
2 | ||
3 | import unittest | |
4 | ||
[647a2d8] | 5 | from glob import glob |
[031b1f9] | 6 | def 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] | 11 | modules_to_test = [] |
[4ecfee9] | 12 | modules_to_test += ['localaubio'] |
[66a150a2] | 13 | modules_to_test += list_of_test_files('src/*.py') |
14 | modules_to_test += list_of_test_files('src/*/*.py') | |
[031b1f9] | 15 | modules_to_test += list_of_test_files('examples/aubio*.py') |
[66a150a2] | 16 | modules_to_test += list_of_test_files('*.py') |
[229ea56] | 17 | |
18 | if __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.