diff options
Diffstat (limited to 'test/test.py')
| -rw-r--r-- | test/test.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test.py b/test/test.py index 40cbf0c..e45912e 100644 --- a/test/test.py +++ b/test/test.py | |||
| @@ -15,6 +15,8 @@ import sys | |||
| 15 | import tempfile | 15 | import tempfile |
| 16 | import unittest | 16 | import unittest |
| 17 | 17 | ||
| 18 | IS_LOCAL = True | ||
| 19 | |||
| 18 | VERBOSITY = 15 | 20 | VERBOSITY = 15 |
| 19 | 21 | ||
| 20 | clean = glob.glob('clean*') | 22 | clean = glob.glob('clean*') |
| @@ -72,6 +74,22 @@ class MATTest(unittest.TestCase): | |||
| 72 | if __name__ == '__main__': | 74 | if __name__ == '__main__': |
| 73 | import clitest | 75 | import clitest |
| 74 | import libtest | 76 | import libtest |
| 77 | import argparse | ||
| 78 | |||
| 79 | parser = argparse.ArgumentParser(description='MAT testsuite') | ||
| 80 | parser.add_argument('-l', '--local', action='store_true', | ||
| 81 | help='Test the local version of mat') | ||
| 82 | parser.add_argument('-s', '--system', action='store_true', | ||
| 83 | help='Test the system-wide version of mat') | ||
| 84 | |||
| 85 | if parser.parse_args().local is True: | ||
| 86 | IS_LOCAL = True | ||
| 87 | elif parser.parse_args().system is True: | ||
| 88 | IS_LOCAL = False | ||
| 89 | else: | ||
| 90 | print('Please specify either --local or --system') | ||
| 91 | sys.exit(1) | ||
| 92 | |||
| 75 | 93 | ||
| 76 | SUITE = unittest.TestSuite() | 94 | SUITE = unittest.TestSuite() |
| 77 | SUITE.addTests(clitest.get_tests()) | 95 | SUITE.addTests(clitest.get_tests()) |
