feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 4ce62cd was
031b1f9,
checked in by Paul Brossier <piem@piem.org>, 17 years ago
|
added examples tests
|
-
Property mode set to
100755
|
File size:
748 bytes
|
Rev | Line | |
---|
[229ea56] | 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. |
---|
| 5 | import sys, os |
---|
[de2a8af] | 6 | |
---|
| 7 | cur_dir = os.path.dirname(sys.argv[0]) |
---|
| 8 | sys.path.append(os.path.join(cur_dir,'..','..','python')) |
---|
| 9 | sys.path.append(os.path.join(cur_dir,'..','..','python','aubio','.libs')) |
---|
[229ea56] | 10 | |
---|
| 11 | import unittest |
---|
| 12 | |
---|
[647a2d8] | 13 | from glob import glob |
---|
[031b1f9] | 14 | def list_of_test_files(path): |
---|
| 15 | return [i.split('.')[0].replace('/','.') for i in glob(path)] |
---|
| 16 | |
---|
| 17 | modules_to_test = list_of_test_files('*.py') |
---|
| 18 | modules_to_test += list_of_test_files('examples/aubio*.py') |
---|
[229ea56] | 19 | |
---|
| 20 | if __name__ == '__main__': |
---|
[647a2d8] | 21 | for module in modules_to_test: |
---|
[031b1f9] | 22 | if module != 'run_all_tests': # (not actually needed) |
---|
[647a2d8] | 23 | exec('from %s import *' % module) |
---|
[229ea56] | 24 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.