1 | #Licensed to the Apache Software Foundation (ASF) under one |
---|
2 | #or more contributor license agreements. See the NOTICE file |
---|
3 | #distributed with this work for additional information |
---|
4 | #regarding copyright ownership. The ASF licenses this file |
---|
5 | #to you under the Apache License, Version 2.0 (the |
---|
6 | #"License"); you may not use this file except in compliance |
---|
7 | #with the License. You may obtain a copy of the License at |
---|
8 | |
---|
9 | # http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | |
---|
11 | #Unless required by applicable law or agreed to in writing, software |
---|
12 | #distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | #See the License for the specific language governing permissions and |
---|
15 | #limitations under the License. |
---|
16 | import unittest, os, sys, re, threading, time |
---|
17 | |
---|
18 | myDirectory = os.path.realpath(sys.argv[0]) |
---|
19 | rootDirectory = re.sub("/testing/.*", "", myDirectory) |
---|
20 | |
---|
21 | sys.path.append(rootDirectory) |
---|
22 | |
---|
23 | from testing.lib import BaseTestSuite |
---|
24 | |
---|
25 | excludes = ['test_MINITEST3'] |
---|
26 | |
---|
27 | # All test-case classes should have the naming convention test_.* |
---|
28 | class test_MINITEST1(unittest.TestCase): |
---|
29 | def setUp(self): |
---|
30 | pass |
---|
31 | |
---|
32 | # All testMethods have to have their names start with 'test' |
---|
33 | def testSuccess(self): |
---|
34 | pass |
---|
35 | |
---|
36 | def testFailure(self): |
---|
37 | pass |
---|
38 | |
---|
39 | def tearDown(self): |
---|
40 | pass |
---|
41 | |
---|
42 | class test_MINITEST2(unittest.TestCase): |
---|
43 | def setUp(self): |
---|
44 | pass |
---|
45 | |
---|
46 | # All testMethods have to have their names start with 'test' |
---|
47 | def testSuccess(self): |
---|
48 | pass |
---|
49 | |
---|
50 | def testFailure(self): |
---|
51 | pass |
---|
52 | |
---|
53 | def tearDown(self): |
---|
54 | pass |
---|
55 | |
---|
56 | class test_MINITEST3(unittest.TestCase): |
---|
57 | def setUp(self): |
---|
58 | pass |
---|
59 | |
---|
60 | # All testMethods have to have their names start with 'test' |
---|
61 | def testSuccess(self): |
---|
62 | pass |
---|
63 | |
---|
64 | def testFailure(self): |
---|
65 | pass |
---|
66 | |
---|
67 | def tearDown(self): |
---|
68 | pass |
---|
69 | |
---|
70 | class ModuleTestSuite(BaseTestSuite): |
---|
71 | def __init__(self): |
---|
72 | # suite setup |
---|
73 | BaseTestSuite.__init__(self, __name__, excludes) |
---|
74 | pass |
---|
75 | |
---|
76 | def cleanUp(self): |
---|
77 | # suite tearDown |
---|
78 | pass |
---|
79 | |
---|
80 | def RunModuleTests(): |
---|
81 | # modulename_suite |
---|
82 | suite = ModuleTestSuite() |
---|
83 | testResult = suite.runTests() |
---|
84 | suite.cleanUp() |
---|
85 | return testResult |
---|
86 | |
---|
87 | if __name__ == "__main__": |
---|
88 | RunModuleTests() |
---|