|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Testing.Interfaces.UnittestExecutor</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Testing.Interfaces.UnittestExecutor</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the executor for the standard 'unittest' framework. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#UnittestExecutor">UnittestExecutor</a></td> |
|
25 <td>Class implementing the executor for the standard 'unittest' framework.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="UnittestExecutor" ID="UnittestExecutor"></a> |
|
36 <h2>UnittestExecutor</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the executor for the standard 'unittest' framework. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 TestExecutorBase |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>module</td></tr><tr><td>name</td></tr><tr><td>runner</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#UnittestExecutor.__init__">UnittestExecutor</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#UnittestExecutor.__processData">__processData</a></td> |
|
63 <td>Private slot to process the received data.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#UnittestExecutor.createArguments">createArguments</a></td> |
|
67 <td>Public method to create the arguments needed to start the test process.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#UnittestExecutor.finished">finished</a></td> |
|
71 <td>Public method handling the unit test process been finished.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#UnittestExecutor.getVersions">getVersions</a></td> |
|
75 <td>Public method to get the test framework version and version information of its installed plugins.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#UnittestExecutor.hasCoverage">hasCoverage</a></td> |
|
79 <td>Public method to get the test framework version and version information of its installed plugins.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#UnittestExecutor.start">start</a></td> |
|
83 <td>Public method to start the testing process.</td> |
|
84 </tr> |
|
85 </table> |
|
86 <h3>Static Methods</h3> |
|
87 |
|
88 <table> |
|
89 <tr><td>None</td></tr> |
|
90 </table> |
|
91 |
|
92 <a NAME="UnittestExecutor.__init__" ID="UnittestExecutor.__init__"></a> |
|
93 <h4>UnittestExecutor (Constructor)</h4> |
|
94 <b>UnittestExecutor</b>(<i>testWidget</i>) |
|
95 |
|
96 <p> |
|
97 Constructor |
|
98 </p> |
|
99 <dl> |
|
100 |
|
101 <dt><i>testWidget</i> (TestingWidget)</dt> |
|
102 <dd> |
|
103 reference to the unit test widget |
|
104 </dd> |
|
105 </dl> |
|
106 <a NAME="UnittestExecutor.__processData" ID="UnittestExecutor.__processData"></a> |
|
107 <h4>UnittestExecutor.__processData</h4> |
|
108 <b>__processData</b>(<i>data</i>) |
|
109 |
|
110 <p> |
|
111 Private slot to process the received data. |
|
112 </p> |
|
113 <dl> |
|
114 |
|
115 <dt><i>data</i> (dict)</dt> |
|
116 <dd> |
|
117 data object received |
|
118 </dd> |
|
119 </dl> |
|
120 <a NAME="UnittestExecutor.createArguments" ID="UnittestExecutor.createArguments"></a> |
|
121 <h4>UnittestExecutor.createArguments</h4> |
|
122 <b>createArguments</b>(<i>config</i>) |
|
123 |
|
124 <p> |
|
125 Public method to create the arguments needed to start the test process. |
|
126 </p> |
|
127 <dl> |
|
128 |
|
129 <dt><i>config</i> (TestConfig)</dt> |
|
130 <dd> |
|
131 configuration for the test execution |
|
132 </dd> |
|
133 </dl> |
|
134 <dl> |
|
135 <dt>Return:</dt> |
|
136 <dd> |
|
137 list of process arguments |
|
138 </dd> |
|
139 </dl> |
|
140 <dl> |
|
141 <dt>Return Type:</dt> |
|
142 <dd> |
|
143 list of str |
|
144 </dd> |
|
145 </dl> |
|
146 <a NAME="UnittestExecutor.finished" ID="UnittestExecutor.finished"></a> |
|
147 <h4>UnittestExecutor.finished</h4> |
|
148 <b>finished</b>(<i></i>) |
|
149 |
|
150 <p> |
|
151 Public method handling the unit test process been finished. |
|
152 </p> |
|
153 <p> |
|
154 This method should read the results (if necessary) and emit the signal |
|
155 testFinished. |
|
156 </p> |
|
157 <a NAME="UnittestExecutor.getVersions" ID="UnittestExecutor.getVersions"></a> |
|
158 <h4>UnittestExecutor.getVersions</h4> |
|
159 <b>getVersions</b>(<i>interpreter</i>) |
|
160 |
|
161 <p> |
|
162 Public method to get the test framework version and version information |
|
163 of its installed plugins. |
|
164 </p> |
|
165 <dl> |
|
166 |
|
167 <dt><i>interpreter</i> (str)</dt> |
|
168 <dd> |
|
169 interpreter to be used for the test |
|
170 </dd> |
|
171 </dl> |
|
172 <dl> |
|
173 <dt>Return:</dt> |
|
174 <dd> |
|
175 dictionary containing the framework name and version and the |
|
176 list of available plugins with name and version each |
|
177 </dd> |
|
178 </dl> |
|
179 <dl> |
|
180 <dt>Return Type:</dt> |
|
181 <dd> |
|
182 dict |
|
183 </dd> |
|
184 </dl> |
|
185 <a NAME="UnittestExecutor.hasCoverage" ID="UnittestExecutor.hasCoverage"></a> |
|
186 <h4>UnittestExecutor.hasCoverage</h4> |
|
187 <b>hasCoverage</b>(<i>interpreter</i>) |
|
188 |
|
189 <p> |
|
190 Public method to get the test framework version and version information |
|
191 of its installed plugins. |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>interpreter</i> (str)</dt> |
|
196 <dd> |
|
197 interpreter to be used for the test |
|
198 </dd> |
|
199 </dl> |
|
200 <dl> |
|
201 <dt>Return:</dt> |
|
202 <dd> |
|
203 flag indicating the availability of coverage functionality |
|
204 </dd> |
|
205 </dl> |
|
206 <dl> |
|
207 <dt>Return Type:</dt> |
|
208 <dd> |
|
209 bool |
|
210 </dd> |
|
211 </dl> |
|
212 <a NAME="UnittestExecutor.start" ID="UnittestExecutor.start"></a> |
|
213 <h4>UnittestExecutor.start</h4> |
|
214 <b>start</b>(<i>config, pythonpath</i>) |
|
215 |
|
216 <p> |
|
217 Public method to start the testing process. |
|
218 </p> |
|
219 <dl> |
|
220 |
|
221 <dt><i>config</i> (TestConfig)</dt> |
|
222 <dd> |
|
223 configuration for the test execution |
|
224 </dd> |
|
225 <dt><i>pythonpath</i> (list of str)</dt> |
|
226 <dd> |
|
227 list of directories to be added to the Python path |
|
228 </dd> |
|
229 </dl> |
|
230 <div align="right"><a href="#top">Up</a></div> |
|
231 <hr /> |
|
232 </body></html> |