From: Paul Brossier Date: Mon, 17 Sep 2007 00:34:13 +0000 (+0200) Subject: python/test: added simple python unit test model X-Git-Tag: bzr2git~517 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=229ea5630ca56d961af169df8b1c66b19e954a56;p=aubio.git python/test: added simple python unit test model --- diff --git a/python/test/all_tests.py b/python/test/all_tests.py new file mode 100755 index 00000000..e0bb247f --- /dev/null +++ b/python/test/all_tests.py @@ -0,0 +1,15 @@ +#! /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 +sys.path.append('..') +sys.path.append(os.path.join('..','aubio','.libs')) + +import unittest + +modules_to_test = ('aubiomodule') + +if __name__ == '__main__': + for module in modules_to_test: exec('from %s import *' % module) + unittest.main() diff --git a/python/test/aubiomodule.py b/python/test/aubiomodule.py new file mode 100644 index 00000000..cc2445c1 --- /dev/null +++ b/python/test/aubiomodule.py @@ -0,0 +1,14 @@ +import unittest + +class aubiomodule_test_case(unittest.TestCase): + + def test_aubio(self): + """ try importing aubio module """ + import aubio + + def test_aubiowrapper(self): + """ try importing aubio.aubiowrapper module """ + from aubio import aubiowrapper + +if __name__ == '__main__': + unittest.main()