__main__.py 1.17 KB
Newer Older
1
from .__init__ import *
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

verbose = 0
failed = []
states = {}

# List To Line Formatter
suite_list_to_line = unittest.TestLoader().loadTestsFromTestCase(FormatterListToLineTestCase)
states.update({'FormatterListToLine': unittest.TextTestRunner(verbosity=verbose).run(suite_list_to_line).wasSuccessful()})

# Array to lines Formatter
suite_array_to_lines = unittest.TestLoader().loadTestsFromTestCase(FormatterArrayToLinesTestCase)
states.update({'FormatterArrayToLines': unittest.TextTestRunner(verbosity=verbose).run(suite_array_to_lines).wasSuccessful()})

# Append to lines Formatter
suite_append_to_lines = unittest.TestLoader().loadTestsFromTestCase(FormatterAppendToLinesTestCase)
states.update({'FormatterAppendToLines': unittest.TextTestRunner(verbosity=verbose).run(suite_append_to_lines).wasSuccessful()})

19
20
21
22
# Weighted Grid
suite_weighted_grid  = unittest.TestLoader().loadTestsFromTestCase(WeightedGridTestCase)
states.update({'WeightedGrid': unittest.TextTestRunner(verbosity=verbose).run(suite_weighted_grid).wasSuccessful()})

23
24
25
26
27
28
for success in states.items():
    if not success[1]:
        failed.append(success[0])

if len(failed):
    raise(Exception('Failing tests suites: '+str(failed)))