From 229ea5630ca56d961af169df8b1c66b19e954a56 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 17 Sep 2007 02:34:13 +0200 Subject: [PATCH] python/test: added simple python unit test model --- python/test/all_tests.py | 15 +++++++++++++++ python/test/aubiomodule.py | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 python/test/all_tests.py create mode 100644 python/test/aubiomodule.py 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() -- 2.26.2