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 EDNA Test class, Parent class for all plugin test cases
35 """
36
37 __authors__ = "Olof Svensson, Jerome Kieffer"
38 __contact__ = "svensson@esrf.eu"
39 __license__ = "LGPLv3+"
40 __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
41 __date__ = "20120711"
42
43 from EDObject import EDObject
44 from EDLogging import EDLogging
45
46
48 """
49 Parent class for plugin test cases
50 """
51 - def __init__(self, _strTestName="Test"):
52 EDLogging.__init__(self)
53 if _strTestName is None:
54 self.__strTestName = self.getClassName()
55 else:
56 self.__strTestName = _strTestName
57 self.__listTest = []
58 self.__bIsVerbose = False
59 self.__bIsDebug = False
60 self.__bIsAssert = False
61 self.__bIsLogFile = False
62 self.__bIsProfile = False
63
64
66 """
67 getter for TestName
68 @return: test name
69 @rtype: string
70 """
71 return self.__strTestName
72
73
75 """
76 Setter for test name
77 @param _strTestName: name of the test
78 @type _strTestName: string
79 """
80 self.__strTestName = _strTestName
81
83 """
84 Add a method to the list of tests
85 """
86 self.__listTest.append(_pyClassMethod)
87
88
90 """
91 getter for the number of tests
92 @rtype: integer
93 @return: number of tests
94 """
95 return len(self.__listTest)
96
97
99 """
100 getter for the list of tests
101 @rtype: list
102 @return: list of tests
103 """
104 return self.__listTest
105
106
113
114
118
119
121 """
122 to be overwritten
123 """
124 self.DEBUG("EDTest.preProcess()")
125
126
128 """
129 to be overridden
130 """
131 self.DEBUG("EDTest.process()")
132
133
134 - def postProcess(self):
135 """
136 to be overridden
137 """
138 self.DEBUG("EDTest.postProcess()")
139
140
142 """
143 to be overridden
144 """
145 self.DEBUG("EDTest.processKernel()")
146