From a4f271f55c0739224bd32818432a59bf08b16288 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 25 Dec 2011 18:21:59 +0100 Subject: Improve modularity for testsuite The test.py file now launch all testsuites. All testsuites now have a main() function --- test/test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py index c414c77..9b440ca 100644 --- a/test/test.py +++ b/test/test.py @@ -11,6 +11,7 @@ import glob import tempfile import unittest import subprocess +import sys VERBOSITY = 3 @@ -60,3 +61,19 @@ class MATTest(unittest.TestCase): Remove the tmp folder ''' shutil.rmtree(self.tmpdir) + +def main(): + import clitest + import libtest + + failed_tests = 0 + + print('Running cli related tests:\n') + failed_tests += clitest.main() + print('\nRunning library related tests:\n') + failed_tests += libtest.main() + print('\nTotal failed tests: ' + str(failed_tests)) + return failed_tests + +if __name__ == '__main__': + sys.exit(main()) -- cgit v1.3