1 | #!/usr/bin/env python |
---|
2 | ''' |
---|
3 | Core module of Cheetah's Unit-testing framework |
---|
4 | |
---|
5 | TODO |
---|
6 | ================================================================================ |
---|
7 | # combo tests |
---|
8 | # negative test cases for expected exceptions |
---|
9 | # black-box vs clear-box testing |
---|
10 | # do some tests that run the Template for long enough to check that the refresh code works |
---|
11 | ''' |
---|
12 | |
---|
13 | import sys |
---|
14 | import unittest |
---|
15 | |
---|
16 | import SyntaxAndOutput |
---|
17 | import NameMapper |
---|
18 | import Filters |
---|
19 | import Template |
---|
20 | import Cheps |
---|
21 | import Regressions |
---|
22 | import Unicode |
---|
23 | import CheetahWrapper |
---|
24 | |
---|
25 | SyntaxAndOutput.install_eols() |
---|
26 | |
---|
27 | suites = [ |
---|
28 | unittest.findTestCases(SyntaxAndOutput), |
---|
29 | unittest.findTestCases(NameMapper), |
---|
30 | unittest.findTestCases(Filters), |
---|
31 | unittest.findTestCases(Template), |
---|
32 | #unittest.findTestCases(Cheps), |
---|
33 | unittest.findTestCases(Regressions), |
---|
34 | unittest.findTestCases(Unicode), |
---|
35 | ] |
---|
36 | |
---|
37 | if not sys.platform.startswith('java'): |
---|
38 | suites.append(unittest.findTestCases(CheetahWrapper)) |
---|
39 | |
---|
40 | if __name__ == '__main__': |
---|
41 | runner = unittest.TextTestRunner() |
---|
42 | if 'xml' in sys.argv: |
---|
43 | import xmlrunner |
---|
44 | runner = xmlrunner.XMLTestRunner(filename='Cheetah-Tests.xml') |
---|
45 | |
---|
46 | results = runner.run(unittest.TestSuite(suites)) |
---|
47 | |
---|