Initial Commit
[Projects.git] / pkgbuilds / pytivo / pkg / usr / share / pyTivo / Cheetah / Tests / Test.py
blob9e46a5d6ab2e1ca169f424383e0c0d93c08c53b0
1 #!/usr/bin/env python
2 # $Id: Test.py,v 1.44 2006/01/15 20:45:10 tavis_rudd Exp $
3 """Core module of Cheetah's Unit-testing framework
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
12 Meta-Data
13 ================================================================================
14 Author: Tavis Rudd <tavis@damnsimple.com>,
15 License: This software is released for unlimited distribution under the
16 terms of the MIT license. See the LICENSE file.
17 Version: $Revision: 1.44 $
18 Start Date: 2001/03/30
19 Last Revision Date: $Date: 2006/01/15 20:45:10 $
20 """
21 __author__ = "Tavis Rudd <tavis@damnsimple.com>"
22 __revision__ = "$Revision: 1.44 $"[11:-2]
25 ##################################################
26 ## DEPENDENCIES ##
28 import sys
29 import unittest_local_copy as unittest
31 ##################################################
32 ## CONSTANTS & GLOBALS
34 try:
35 True, False
36 except NameError:
37 True, False = (1==1),(1==0)
39 ##################################################
40 ## TESTS
42 import SyntaxAndOutput
43 import NameMapper
44 import Template
45 import FileRefresh
46 import CheetahWrapper
48 SyntaxSuite = unittest.findTestCases(SyntaxAndOutput)
49 NameMapperSuite = unittest.findTestCases(NameMapper)
50 TemplateSuite = unittest.findTestCases(Template)
51 FileRefreshSuite = unittest.findTestCases(FileRefresh)
52 if not sys.platform.startswith('java'):
53 CheetahWrapperSuite = unittest.findTestCases(CheetahWrapper)
55 from SyntaxAndOutput import *
56 from NameMapper import *
57 from Template import *
58 from FileRefresh import *
60 if not sys.platform.startswith('java'):
61 from CheetahWrapper import *
63 ##################################################
64 ## if run from the command line
66 if __name__ == '__main__':
67 unittest.main()