diff options
| author | jvoisin | 2011-12-25 18:21:59 +0100 |
|---|---|---|
| committer | jvoisin | 2011-12-25 18:21:59 +0100 |
| commit | a4f271f55c0739224bd32818432a59bf08b16288 (patch) | |
| tree | e3f4d64b8fbec01e5e41db221ba5f93ada066327 /test/test.py | |
| parent | ae1169016f6ea82631227a9d0cb42af291a9ae18 (diff) | |
Improve modularity for testsuite
The test.py file now launch all testsuites.
All testsuites now have a main() function
Diffstat (limited to 'test/test.py')
| -rw-r--r-- | test/test.py | 17 |
1 files changed, 17 insertions, 0 deletions
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 | |||
| 11 | import tempfile | 11 | import tempfile |
| 12 | import unittest | 12 | import unittest |
| 13 | import subprocess | 13 | import subprocess |
| 14 | import sys | ||
| 14 | 15 | ||
| 15 | VERBOSITY = 3 | 16 | VERBOSITY = 3 |
| 16 | 17 | ||
| @@ -60,3 +61,19 @@ class MATTest(unittest.TestCase): | |||
| 60 | Remove the tmp folder | 61 | Remove the tmp folder |
| 61 | ''' | 62 | ''' |
| 62 | shutil.rmtree(self.tmpdir) | 63 | shutil.rmtree(self.tmpdir) |
| 64 | |||
| 65 | def main(): | ||
| 66 | import clitest | ||
| 67 | import libtest | ||
| 68 | |||
| 69 | failed_tests = 0 | ||
| 70 | |||
| 71 | print('Running cli related tests:\n') | ||
| 72 | failed_tests += clitest.main() | ||
| 73 | print('\nRunning library related tests:\n') | ||
| 74 | failed_tests += libtest.main() | ||
| 75 | print('\nTotal failed tests: ' + str(failed_tests)) | ||
| 76 | return failed_tests | ||
| 77 | |||
| 78 | if __name__ == '__main__': | ||
| 79 | sys.exit(main()) | ||
