|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.PyUnit.UnittestDialog</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.PyUnit.UnittestDialog</h1> |
|
23 <p> |
|
24 Module implementing the UI to the pyunit package. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#QtTestResult">QtTestResult</a></td> |
|
34 <td>A TestResult derivative to work with a graphical GUI.</td> |
|
35 </tr><tr> |
|
36 <td><a href="#UnittestDialog">UnittestDialog</a></td> |
|
37 <td>Class implementing the UI to the pyunit package.</td> |
|
38 </tr><tr> |
|
39 <td><a href="#UnittestWindow">UnittestWindow</a></td> |
|
40 <td>Main window class for the standalone dialog.</td> |
|
41 </tr> |
|
42 </table> |
|
43 <h3>Functions</h3> |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /><hr /> |
|
48 <a NAME="QtTestResult" ID="QtTestResult"></a> |
|
49 <h2>QtTestResult</h2> |
|
50 <p> |
|
51 A TestResult derivative to work with a graphical GUI. |
|
52 </p><p> |
|
53 For more details see pyunit.py of the standard python distribution. |
|
54 </p> |
|
55 <h3>Derived from</h3> |
|
56 unittest.TestResult |
|
57 <h3>Class Attributes</h3> |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Class Methods</h3> |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Methods</h3> |
|
66 <table> |
|
67 <tr> |
|
68 <td><a href="#QtTestResult.__init__">QtTestResult</a></td> |
|
69 <td>Constructor</td> |
|
70 </tr><tr> |
|
71 <td><a href="#QtTestResult.addError">addError</a></td> |
|
72 <td>Public method called if a test errored.</td> |
|
73 </tr><tr> |
|
74 <td><a href="#QtTestResult.addExpectedFailure">addExpectedFailure</a></td> |
|
75 <td>Public method called if a test failed expected.</td> |
|
76 </tr><tr> |
|
77 <td><a href="#QtTestResult.addFailure">addFailure</a></td> |
|
78 <td>Public method called if a test failed.</td> |
|
79 </tr><tr> |
|
80 <td><a href="#QtTestResult.addSkip">addSkip</a></td> |
|
81 <td>Public method called if a test was skipped.</td> |
|
82 </tr><tr> |
|
83 <td><a href="#QtTestResult.addUnexpectedSuccess">addUnexpectedSuccess</a></td> |
|
84 <td>Public method called if a test succeeded expectedly.</td> |
|
85 </tr><tr> |
|
86 <td><a href="#QtTestResult.startTest">startTest</a></td> |
|
87 <td>Public method called at the start of a test.</td> |
|
88 </tr><tr> |
|
89 <td><a href="#QtTestResult.stopTest">stopTest</a></td> |
|
90 <td>Public method called at the end of a test.</td> |
|
91 </tr> |
|
92 </table> |
|
93 <h3>Static Methods</h3> |
|
94 <table> |
|
95 <tr><td>None</td></tr> |
|
96 </table> |
|
97 <a NAME="QtTestResult.__init__" ID="QtTestResult.__init__"></a> |
|
98 <h4>QtTestResult (Constructor)</h4> |
|
99 <b>QtTestResult</b>(<i>parent</i>) |
|
100 <p> |
|
101 Constructor |
|
102 </p><dl> |
|
103 <dt><i>parent</i></dt> |
|
104 <dd> |
|
105 The parent widget. |
|
106 </dd> |
|
107 </dl><a NAME="QtTestResult.addError" ID="QtTestResult.addError"></a> |
|
108 <h4>QtTestResult.addError</h4> |
|
109 <b>addError</b>(<i>test, err</i>) |
|
110 <p> |
|
111 Public method called if a test errored. |
|
112 </p><dl> |
|
113 <dt><i>test</i></dt> |
|
114 <dd> |
|
115 reference to the test object |
|
116 </dd><dt><i>err</i></dt> |
|
117 <dd> |
|
118 error traceback |
|
119 </dd> |
|
120 </dl><a NAME="QtTestResult.addExpectedFailure" ID="QtTestResult.addExpectedFailure"></a> |
|
121 <h4>QtTestResult.addExpectedFailure</h4> |
|
122 <b>addExpectedFailure</b>(<i>test, err</i>) |
|
123 <p> |
|
124 Public method called if a test failed expected. |
|
125 </p><dl> |
|
126 <dt><i>test</i></dt> |
|
127 <dd> |
|
128 reference to the test object |
|
129 </dd><dt><i>err</i></dt> |
|
130 <dd> |
|
131 error traceback |
|
132 </dd> |
|
133 </dl><a NAME="QtTestResult.addFailure" ID="QtTestResult.addFailure"></a> |
|
134 <h4>QtTestResult.addFailure</h4> |
|
135 <b>addFailure</b>(<i>test, err</i>) |
|
136 <p> |
|
137 Public method called if a test failed. |
|
138 </p><dl> |
|
139 <dt><i>test</i></dt> |
|
140 <dd> |
|
141 reference to the test object |
|
142 </dd><dt><i>err</i></dt> |
|
143 <dd> |
|
144 error traceback |
|
145 </dd> |
|
146 </dl><a NAME="QtTestResult.addSkip" ID="QtTestResult.addSkip"></a> |
|
147 <h4>QtTestResult.addSkip</h4> |
|
148 <b>addSkip</b>(<i>test, reason</i>) |
|
149 <p> |
|
150 Public method called if a test was skipped. |
|
151 </p><dl> |
|
152 <dt><i>test</i></dt> |
|
153 <dd> |
|
154 reference to the test object |
|
155 </dd><dt><i>reason</i></dt> |
|
156 <dd> |
|
157 reason for skipping the test (string) |
|
158 </dd> |
|
159 </dl><a NAME="QtTestResult.addUnexpectedSuccess" ID="QtTestResult.addUnexpectedSuccess"></a> |
|
160 <h4>QtTestResult.addUnexpectedSuccess</h4> |
|
161 <b>addUnexpectedSuccess</b>(<i>test</i>) |
|
162 <p> |
|
163 Public method called if a test succeeded expectedly. |
|
164 </p><dl> |
|
165 <dt><i>test</i></dt> |
|
166 <dd> |
|
167 reference to the test object |
|
168 </dd> |
|
169 </dl><a NAME="QtTestResult.startTest" ID="QtTestResult.startTest"></a> |
|
170 <h4>QtTestResult.startTest</h4> |
|
171 <b>startTest</b>(<i>test</i>) |
|
172 <p> |
|
173 Public method called at the start of a test. |
|
174 </p><dl> |
|
175 <dt><i>test</i></dt> |
|
176 <dd> |
|
177 Reference to the test object |
|
178 </dd> |
|
179 </dl><a NAME="QtTestResult.stopTest" ID="QtTestResult.stopTest"></a> |
|
180 <h4>QtTestResult.stopTest</h4> |
|
181 <b>stopTest</b>(<i>test</i>) |
|
182 <p> |
|
183 Public method called at the end of a test. |
|
184 </p><dl> |
|
185 <dt><i>test</i></dt> |
|
186 <dd> |
|
187 Reference to the test object |
|
188 </dd> |
|
189 </dl> |
|
190 <div align="right"><a href="#top">Up</a></div> |
|
191 <hr /><hr /> |
|
192 <a NAME="UnittestDialog" ID="UnittestDialog"></a> |
|
193 <h2>UnittestDialog</h2> |
|
194 <p> |
|
195 Class implementing the UI to the pyunit package. |
|
196 </p><h3>Signals</h3> |
|
197 <dl> |
|
198 <dt>unittestFile(str, int, int)</dt> |
|
199 <dd> |
|
200 emitted to show the source of a |
|
201 unittest file |
|
202 </dd><dt>unittestStopped()</dt> |
|
203 <dd> |
|
204 emitted after a unit test was run |
|
205 </dd> |
|
206 </dl> |
|
207 <h3>Derived from</h3> |
|
208 QWidget, Ui_UnittestDialog |
|
209 <h3>Class Attributes</h3> |
|
210 <table> |
|
211 <tr><td>None</td></tr> |
|
212 </table> |
|
213 <h3>Class Methods</h3> |
|
214 <table> |
|
215 <tr><td>None</td></tr> |
|
216 </table> |
|
217 <h3>Methods</h3> |
|
218 <table> |
|
219 <tr> |
|
220 <td><a href="#UnittestDialog.__init__">UnittestDialog</a></td> |
|
221 <td>Constructor</td> |
|
222 </tr><tr> |
|
223 <td><a href="#UnittestDialog.__UTPrepared">__UTPrepared</a></td> |
|
224 <td>Private slot to handle the utPrepared signal.</td> |
|
225 </tr><tr> |
|
226 <td><a href="#UnittestDialog.__setProgressColor">__setProgressColor</a></td> |
|
227 <td>Private methode to set the color of the progress color label.</td> |
|
228 </tr><tr> |
|
229 <td><a href="#UnittestDialog.__setRunningMode">__setRunningMode</a></td> |
|
230 <td>Private method to set the GUI in running mode.</td> |
|
231 </tr><tr> |
|
232 <td><a href="#UnittestDialog.__setStoppedMode">__setStoppedMode</a></td> |
|
233 <td>Private method to set the GUI in stopped mode.</td> |
|
234 </tr><tr> |
|
235 <td><a href="#UnittestDialog.__showSource">__showSource</a></td> |
|
236 <td>Private slot to show the source of a traceback in an eric6 editor.</td> |
|
237 </tr><tr> |
|
238 <td><a href="#UnittestDialog.hasFailedTests">hasFailedTests</a></td> |
|
239 <td>Public method to check, if there are failed tests from the last run.</td> |
|
240 </tr><tr> |
|
241 <td><a href="#UnittestDialog.insertProg">insertProg</a></td> |
|
242 <td>Public slot to insert the filename prog into the testsuiteComboBox object.</td> |
|
243 </tr><tr> |
|
244 <td><a href="#UnittestDialog.insertTestName">insertTestName</a></td> |
|
245 <td>Public slot to insert a test name into the testComboBox object.</td> |
|
246 </tr><tr> |
|
247 <td><a href="#UnittestDialog.keyPressEvent">keyPressEvent</a></td> |
|
248 <td>Protected slot to handle key press events.</td> |
|
249 </tr><tr> |
|
250 <td><a href="#UnittestDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> |
|
251 <td>Private slot called by a button of the button box clicked.</td> |
|
252 </tr><tr> |
|
253 <td><a href="#UnittestDialog.on_errorsListWidget_currentTextChanged">on_errorsListWidget_currentTextChanged</a></td> |
|
254 <td>Private slot to handle the highlighted signal.</td> |
|
255 </tr><tr> |
|
256 <td><a href="#UnittestDialog.on_errorsListWidget_itemDoubleClicked">on_errorsListWidget_itemDoubleClicked</a></td> |
|
257 <td>Private slot called by doubleclicking an errorlist entry.</td> |
|
258 </tr><tr> |
|
259 <td><a href="#UnittestDialog.on_fileDialogButton_clicked">on_fileDialogButton_clicked</a></td> |
|
260 <td>Private slot to open a file dialog.</td> |
|
261 </tr><tr> |
|
262 <td><a href="#UnittestDialog.on_startButton_clicked">on_startButton_clicked</a></td> |
|
263 <td>Private slot to start the test.</td> |
|
264 </tr><tr> |
|
265 <td><a href="#UnittestDialog.on_stopButton_clicked">on_stopButton_clicked</a></td> |
|
266 <td>Private slot to stop the test.</td> |
|
267 </tr><tr> |
|
268 <td><a href="#UnittestDialog.on_testsuiteComboBox_editTextChanged">on_testsuiteComboBox_editTextChanged</a></td> |
|
269 <td>Private slot to handle changes of the test file name.</td> |
|
270 </tr><tr> |
|
271 <td><a href="#UnittestDialog.testErrored">testErrored</a></td> |
|
272 <td>Public method called if a test errors.</td> |
|
273 </tr><tr> |
|
274 <td><a href="#UnittestDialog.testFailed">testFailed</a></td> |
|
275 <td>Public method called if a test fails.</td> |
|
276 </tr><tr> |
|
277 <td><a href="#UnittestDialog.testFailedExpected">testFailedExpected</a></td> |
|
278 <td>Public method called if a test fails expectedly.</td> |
|
279 </tr><tr> |
|
280 <td><a href="#UnittestDialog.testFinished">testFinished</a></td> |
|
281 <td>Public method called if a test has finished.</td> |
|
282 </tr><tr> |
|
283 <td><a href="#UnittestDialog.testSkipped">testSkipped</a></td> |
|
284 <td>Public method called if a test was skipped.</td> |
|
285 </tr><tr> |
|
286 <td><a href="#UnittestDialog.testStarted">testStarted</a></td> |
|
287 <td>Public method called if a test is about to be run.</td> |
|
288 </tr><tr> |
|
289 <td><a href="#UnittestDialog.testSucceededUnexpected">testSucceededUnexpected</a></td> |
|
290 <td>Public method called if a test succeeds unexpectedly.</td> |
|
291 </tr> |
|
292 </table> |
|
293 <h3>Static Methods</h3> |
|
294 <table> |
|
295 <tr><td>None</td></tr> |
|
296 </table> |
|
297 <a NAME="UnittestDialog.__init__" ID="UnittestDialog.__init__"></a> |
|
298 <h4>UnittestDialog (Constructor)</h4> |
|
299 <b>UnittestDialog</b>(<i>prog=None, dbs=None, ui=None, fromEric=False, parent=None, name=None</i>) |
|
300 <p> |
|
301 Constructor |
|
302 </p><dl> |
|
303 <dt><i>prog</i></dt> |
|
304 <dd> |
|
305 filename of the program to open |
|
306 </dd><dt><i>dbs</i></dt> |
|
307 <dd> |
|
308 reference to the debug server object. It is an indication |
|
309 whether we were called from within the eric6 IDE |
|
310 </dd><dt><i>ui</i></dt> |
|
311 <dd> |
|
312 reference to the UI object |
|
313 </dd><dt><i>fromEric</i></dt> |
|
314 <dd> |
|
315 flag indicating an instantiation from within the |
|
316 eric IDE (boolean) |
|
317 </dd><dt><i>parent</i></dt> |
|
318 <dd> |
|
319 parent widget of this dialog (QWidget) |
|
320 </dd><dt><i>name</i></dt> |
|
321 <dd> |
|
322 name of this dialog (string) |
|
323 </dd> |
|
324 </dl><a NAME="UnittestDialog.__UTPrepared" ID="UnittestDialog.__UTPrepared"></a> |
|
325 <h4>UnittestDialog.__UTPrepared</h4> |
|
326 <b>__UTPrepared</b>(<i>nrTests, exc_type, exc_value</i>) |
|
327 <p> |
|
328 Private slot to handle the utPrepared signal. |
|
329 </p><p> |
|
330 If the unittest suite was loaded successfully, we ask the |
|
331 client to run the test suite. |
|
332 </p><dl> |
|
333 <dt><i>nrTests</i></dt> |
|
334 <dd> |
|
335 number of tests contained in the test suite (integer) |
|
336 </dd><dt><i>exc_type</i></dt> |
|
337 <dd> |
|
338 type of exception occured during preparation (string) |
|
339 </dd><dt><i>exc_value</i></dt> |
|
340 <dd> |
|
341 value of exception occured during preparation (string) |
|
342 </dd> |
|
343 </dl><a NAME="UnittestDialog.__setProgressColor" ID="UnittestDialog.__setProgressColor"></a> |
|
344 <h4>UnittestDialog.__setProgressColor</h4> |
|
345 <b>__setProgressColor</b>(<i>color</i>) |
|
346 <p> |
|
347 Private methode to set the color of the progress color label. |
|
348 </p><dl> |
|
349 <dt><i>color</i></dt> |
|
350 <dd> |
|
351 colour to be shown (string) |
|
352 </dd> |
|
353 </dl><a NAME="UnittestDialog.__setRunningMode" ID="UnittestDialog.__setRunningMode"></a> |
|
354 <h4>UnittestDialog.__setRunningMode</h4> |
|
355 <b>__setRunningMode</b>(<i></i>) |
|
356 <p> |
|
357 Private method to set the GUI in running mode. |
|
358 </p><a NAME="UnittestDialog.__setStoppedMode" ID="UnittestDialog.__setStoppedMode"></a> |
|
359 <h4>UnittestDialog.__setStoppedMode</h4> |
|
360 <b>__setStoppedMode</b>(<i></i>) |
|
361 <p> |
|
362 Private method to set the GUI in stopped mode. |
|
363 </p><a NAME="UnittestDialog.__showSource" ID="UnittestDialog.__showSource"></a> |
|
364 <h4>UnittestDialog.__showSource</h4> |
|
365 <b>__showSource</b>(<i></i>) |
|
366 <p> |
|
367 Private slot to show the source of a traceback in an eric6 editor. |
|
368 </p><a NAME="UnittestDialog.hasFailedTests" ID="UnittestDialog.hasFailedTests"></a> |
|
369 <h4>UnittestDialog.hasFailedTests</h4> |
|
370 <b>hasFailedTests</b>(<i></i>) |
|
371 <p> |
|
372 Public method to check, if there are failed tests from the last run. |
|
373 </p><dl> |
|
374 <dt>Returns:</dt> |
|
375 <dd> |
|
376 flag indicating the presence of failed tests (boolean) |
|
377 </dd> |
|
378 </dl><a NAME="UnittestDialog.insertProg" ID="UnittestDialog.insertProg"></a> |
|
379 <h4>UnittestDialog.insertProg</h4> |
|
380 <b>insertProg</b>(<i>prog</i>) |
|
381 <p> |
|
382 Public slot to insert the filename prog into the testsuiteComboBox |
|
383 object. |
|
384 </p><dl> |
|
385 <dt><i>prog</i></dt> |
|
386 <dd> |
|
387 filename to be inserted (string) |
|
388 </dd> |
|
389 </dl><a NAME="UnittestDialog.insertTestName" ID="UnittestDialog.insertTestName"></a> |
|
390 <h4>UnittestDialog.insertTestName</h4> |
|
391 <b>insertTestName</b>(<i>testName</i>) |
|
392 <p> |
|
393 Public slot to insert a test name into the testComboBox object. |
|
394 </p><dl> |
|
395 <dt><i>testName</i></dt> |
|
396 <dd> |
|
397 name of the test to be inserted (string) |
|
398 </dd> |
|
399 </dl><a NAME="UnittestDialog.keyPressEvent" ID="UnittestDialog.keyPressEvent"></a> |
|
400 <h4>UnittestDialog.keyPressEvent</h4> |
|
401 <b>keyPressEvent</b>(<i>evt</i>) |
|
402 <p> |
|
403 Protected slot to handle key press events. |
|
404 </p><dl> |
|
405 <dt><i>evt</i></dt> |
|
406 <dd> |
|
407 key press event to handle (QKeyEvent) |
|
408 </dd> |
|
409 </dl><a NAME="UnittestDialog.on_buttonBox_clicked" ID="UnittestDialog.on_buttonBox_clicked"></a> |
|
410 <h4>UnittestDialog.on_buttonBox_clicked</h4> |
|
411 <b>on_buttonBox_clicked</b>(<i>button</i>) |
|
412 <p> |
|
413 Private slot called by a button of the button box clicked. |
|
414 </p><dl> |
|
415 <dt><i>button</i></dt> |
|
416 <dd> |
|
417 button that was clicked (QAbstractButton) |
|
418 </dd> |
|
419 </dl><a NAME="UnittestDialog.on_errorsListWidget_currentTextChanged" ID="UnittestDialog.on_errorsListWidget_currentTextChanged"></a> |
|
420 <h4>UnittestDialog.on_errorsListWidget_currentTextChanged</h4> |
|
421 <b>on_errorsListWidget_currentTextChanged</b>(<i>text</i>) |
|
422 <p> |
|
423 Private slot to handle the highlighted signal. |
|
424 </p><dl> |
|
425 <dt><i>text</i></dt> |
|
426 <dd> |
|
427 current text (string) |
|
428 </dd> |
|
429 </dl><a NAME="UnittestDialog.on_errorsListWidget_itemDoubleClicked" ID="UnittestDialog.on_errorsListWidget_itemDoubleClicked"></a> |
|
430 <h4>UnittestDialog.on_errorsListWidget_itemDoubleClicked</h4> |
|
431 <b>on_errorsListWidget_itemDoubleClicked</b>(<i>lbitem</i>) |
|
432 <p> |
|
433 Private slot called by doubleclicking an errorlist entry. |
|
434 </p><p> |
|
435 It will popup a dialog showing the stacktrace. |
|
436 If called from eric, an additional button is displayed |
|
437 to show the python source in an eric source viewer (in |
|
438 erics main window. |
|
439 </p><dl> |
|
440 <dt><i>lbitem</i></dt> |
|
441 <dd> |
|
442 the listbox item that was double clicked |
|
443 </dd> |
|
444 </dl><a NAME="UnittestDialog.on_fileDialogButton_clicked" ID="UnittestDialog.on_fileDialogButton_clicked"></a> |
|
445 <h4>UnittestDialog.on_fileDialogButton_clicked</h4> |
|
446 <b>on_fileDialogButton_clicked</b>(<i></i>) |
|
447 <p> |
|
448 Private slot to open a file dialog. |
|
449 </p><a NAME="UnittestDialog.on_startButton_clicked" ID="UnittestDialog.on_startButton_clicked"></a> |
|
450 <h4>UnittestDialog.on_startButton_clicked</h4> |
|
451 <b>on_startButton_clicked</b>(<i>failedOnly=False</i>) |
|
452 <p> |
|
453 Private slot to start the test. |
|
454 </p><dl> |
|
455 <dt><i>failedOnly=</i></dt> |
|
456 <dd> |
|
457 flag indicating to run only failed tests (boolean) |
|
458 </dd> |
|
459 </dl><a NAME="UnittestDialog.on_stopButton_clicked" ID="UnittestDialog.on_stopButton_clicked"></a> |
|
460 <h4>UnittestDialog.on_stopButton_clicked</h4> |
|
461 <b>on_stopButton_clicked</b>(<i></i>) |
|
462 <p> |
|
463 Private slot to stop the test. |
|
464 </p><a NAME="UnittestDialog.on_testsuiteComboBox_editTextChanged" ID="UnittestDialog.on_testsuiteComboBox_editTextChanged"></a> |
|
465 <h4>UnittestDialog.on_testsuiteComboBox_editTextChanged</h4> |
|
466 <b>on_testsuiteComboBox_editTextChanged</b>(<i>txt</i>) |
|
467 <p> |
|
468 Private slot to handle changes of the test file name. |
|
469 </p><dl> |
|
470 <dt><i>txt</i></dt> |
|
471 <dd> |
|
472 name of the test file (string) |
|
473 </dd> |
|
474 </dl><a NAME="UnittestDialog.testErrored" ID="UnittestDialog.testErrored"></a> |
|
475 <h4>UnittestDialog.testErrored</h4> |
|
476 <b>testErrored</b>(<i>test, exc, id</i>) |
|
477 <p> |
|
478 Public method called if a test errors. |
|
479 </p><dl> |
|
480 <dt><i>test</i></dt> |
|
481 <dd> |
|
482 name of the test (string) |
|
483 </dd><dt><i>exc</i></dt> |
|
484 <dd> |
|
485 string representation of the exception (string) |
|
486 </dd><dt><i>id</i></dt> |
|
487 <dd> |
|
488 id of the test (string) |
|
489 </dd> |
|
490 </dl><a NAME="UnittestDialog.testFailed" ID="UnittestDialog.testFailed"></a> |
|
491 <h4>UnittestDialog.testFailed</h4> |
|
492 <b>testFailed</b>(<i>test, exc, id</i>) |
|
493 <p> |
|
494 Public method called if a test fails. |
|
495 </p><dl> |
|
496 <dt><i>test</i></dt> |
|
497 <dd> |
|
498 name of the test (string) |
|
499 </dd><dt><i>exc</i></dt> |
|
500 <dd> |
|
501 string representation of the exception (string) |
|
502 </dd><dt><i>id</i></dt> |
|
503 <dd> |
|
504 id of the test (string) |
|
505 </dd> |
|
506 </dl><a NAME="UnittestDialog.testFailedExpected" ID="UnittestDialog.testFailedExpected"></a> |
|
507 <h4>UnittestDialog.testFailedExpected</h4> |
|
508 <b>testFailedExpected</b>(<i>test, exc, id</i>) |
|
509 <p> |
|
510 Public method called if a test fails expectedly. |
|
511 </p><dl> |
|
512 <dt><i>test</i></dt> |
|
513 <dd> |
|
514 name of the test (string) |
|
515 </dd><dt><i>exc</i></dt> |
|
516 <dd> |
|
517 string representation of the exception (string) |
|
518 </dd><dt><i>id</i></dt> |
|
519 <dd> |
|
520 id of the test (string) |
|
521 </dd> |
|
522 </dl><a NAME="UnittestDialog.testFinished" ID="UnittestDialog.testFinished"></a> |
|
523 <h4>UnittestDialog.testFinished</h4> |
|
524 <b>testFinished</b>(<i></i>) |
|
525 <p> |
|
526 Public method called if a test has finished. |
|
527 </p><p> |
|
528 <b>Note</b>: It is also called if it has already failed or errored. |
|
529 </p><a NAME="UnittestDialog.testSkipped" ID="UnittestDialog.testSkipped"></a> |
|
530 <h4>UnittestDialog.testSkipped</h4> |
|
531 <b>testSkipped</b>(<i>test, reason, id</i>) |
|
532 <p> |
|
533 Public method called if a test was skipped. |
|
534 </p><dl> |
|
535 <dt><i>test</i></dt> |
|
536 <dd> |
|
537 name of the test (string) |
|
538 </dd><dt><i>reason</i></dt> |
|
539 <dd> |
|
540 reason for skipping the test (string) |
|
541 </dd><dt><i>id</i></dt> |
|
542 <dd> |
|
543 id of the test (string) |
|
544 </dd> |
|
545 </dl><a NAME="UnittestDialog.testStarted" ID="UnittestDialog.testStarted"></a> |
|
546 <h4>UnittestDialog.testStarted</h4> |
|
547 <b>testStarted</b>(<i>test, doc</i>) |
|
548 <p> |
|
549 Public method called if a test is about to be run. |
|
550 </p><dl> |
|
551 <dt><i>test</i></dt> |
|
552 <dd> |
|
553 name of the started test (string) |
|
554 </dd><dt><i>doc</i></dt> |
|
555 <dd> |
|
556 documentation of the started test (string) |
|
557 </dd> |
|
558 </dl><a NAME="UnittestDialog.testSucceededUnexpected" ID="UnittestDialog.testSucceededUnexpected"></a> |
|
559 <h4>UnittestDialog.testSucceededUnexpected</h4> |
|
560 <b>testSucceededUnexpected</b>(<i>test, id</i>) |
|
561 <p> |
|
562 Public method called if a test succeeds unexpectedly. |
|
563 </p><dl> |
|
564 <dt><i>test</i></dt> |
|
565 <dd> |
|
566 name of the test (string) |
|
567 </dd><dt><i>id</i></dt> |
|
568 <dd> |
|
569 id of the test (string) |
|
570 </dd> |
|
571 </dl> |
|
572 <div align="right"><a href="#top">Up</a></div> |
|
573 <hr /><hr /> |
|
574 <a NAME="UnittestWindow" ID="UnittestWindow"></a> |
|
575 <h2>UnittestWindow</h2> |
|
576 <p> |
|
577 Main window class for the standalone dialog. |
|
578 </p> |
|
579 <h3>Derived from</h3> |
|
580 E5MainWindow |
|
581 <h3>Class Attributes</h3> |
|
582 <table> |
|
583 <tr><td>None</td></tr> |
|
584 </table> |
|
585 <h3>Class Methods</h3> |
|
586 <table> |
|
587 <tr><td>None</td></tr> |
|
588 </table> |
|
589 <h3>Methods</h3> |
|
590 <table> |
|
591 <tr> |
|
592 <td><a href="#UnittestWindow.__init__">UnittestWindow</a></td> |
|
593 <td>Constructor</td> |
|
594 </tr><tr> |
|
595 <td><a href="#UnittestWindow.eventFilter">eventFilter</a></td> |
|
596 <td>Public method to filter events.</td> |
|
597 </tr> |
|
598 </table> |
|
599 <h3>Static Methods</h3> |
|
600 <table> |
|
601 <tr><td>None</td></tr> |
|
602 </table> |
|
603 <a NAME="UnittestWindow.__init__" ID="UnittestWindow.__init__"></a> |
|
604 <h4>UnittestWindow (Constructor)</h4> |
|
605 <b>UnittestWindow</b>(<i>prog=None, parent=None</i>) |
|
606 <p> |
|
607 Constructor |
|
608 </p><dl> |
|
609 <dt><i>prog</i></dt> |
|
610 <dd> |
|
611 filename of the program to open |
|
612 </dd><dt><i>parent</i></dt> |
|
613 <dd> |
|
614 reference to the parent widget (QWidget) |
|
615 </dd> |
|
616 </dl><a NAME="UnittestWindow.eventFilter" ID="UnittestWindow.eventFilter"></a> |
|
617 <h4>UnittestWindow.eventFilter</h4> |
|
618 <b>eventFilter</b>(<i>obj, event</i>) |
|
619 <p> |
|
620 Public method to filter events. |
|
621 </p><dl> |
|
622 <dt><i>obj</i></dt> |
|
623 <dd> |
|
624 reference to the object the event is meant for (QObject) |
|
625 </dd><dt><i>event</i></dt> |
|
626 <dd> |
|
627 reference to the event object (QEvent) |
|
628 </dd> |
|
629 </dl><dl> |
|
630 <dt>Returns:</dt> |
|
631 <dd> |
|
632 flag indicating, whether the event was handled (boolean) |
|
633 </dd> |
|
634 </dl> |
|
635 <div align="right"><a href="#top">Up</a></div> |
|
636 <hr /> |
|
637 </body></html> |