forked from linz/QGIS-AIMS-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunAllTests.py
70 lines (46 loc) · 1.82 KB
/
RunAllTests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
'''
v.0.0.1
QGIS-AIMS-Plugin - RunAllTests
Copyright 2011 Crown copyright (c)
Land Information New Zealand and the New Zealand Government.
All rights reserved
This program is released under the terms of the new BSD license. See the
LICENSE file for more information.
Test Suite runner
Created on 29/10/2015
@author: jramsay
'''
import unittest
#bitmask imports
IMASK = {'all':0xF,'adr':0x1,'db':0x2,'lm':0x4,'con':0x8,'xdb':0xD}
BM=0xF
if BM & IMASK['adr']:
from Test.Address_Test import Test_0_AddressSelfTest as AT0
from Test.Address_Test import Test_1_AddressTestSetters as AT1
from Test.AddressFactory_Test import Test_0_TemplateReaderSelfTest as AFT0
from Test.AddressFactory_Test import Test_1_AddressFactorySelfTest as AFT1
from Test.AddressFactory_Test import Test_2_AddressTestSetters as AFT2
if BM & IMASK['db']:
from Test.Database_Test import Test_0_DatabaseSelfTest as DT0
from Test.Database_Test import Test_1_DatabaseTestSetters as DT1
from Test.Database_Test import Test_2_DatabaseConnectivity as DT2
if BM & IMASK['lm']:
from Test.LayerManager_Test import Test_0_LayerManagerSelfTest as LMT0
from Test.LayerManager_Test import Test_1_LayerManagerSetters as LMT1
from Test.LayerManager_Test import Test_2_LayerManagerConnection as LMT2
if BM & IMASK['con']:
from Test.Controller_Test import Test_0_ControllerSelfTest as CT0
from Test.Controller_Test import Test_1_ControllerTestSetupFunction as CT1
from AimsUI.AimsLogging import Logger
testlog = Logger.setup()
class FullSuite(unittest.TestSuite):
def __init__(self):
pass
def suite(self):
return unittest.TestSuite()
def main():
suite = FullSuite().suite()
runner = unittest.TextTestRunner()
runner.run(suite)
if __name__ == "__main__":
main()