summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py18
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
15import tempfile 15import tempfile
16import unittest 16import unittest
17 17
18IS_LOCAL = True
19
18VERBOSITY = 15 20VERBOSITY = 15
19 21
20clean = glob.glob('clean*') 22clean = glob.glob('clean*')
@@ -72,6 +74,22 @@ class MATTest(unittest.TestCase):
72if __name__ == '__main__': 74if __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())