66 <td>Constructor</td> |
66 <td>Constructor</td> |
67 </tr><tr> |
67 </tr><tr> |
68 <td><a href="#QtTestResult.addError">addError</a></td> |
68 <td><a href="#QtTestResult.addError">addError</a></td> |
69 <td>Method called if a test errored.</td> |
69 <td>Method called if a test errored.</td> |
70 </tr><tr> |
70 </tr><tr> |
|
71 <td><a href="#QtTestResult.addExpectedFailure">addExpectedFailure</a></td> |
|
72 <td>Method called if a test failed expected.</td> |
|
73 </tr><tr> |
71 <td><a href="#QtTestResult.addFailure">addFailure</a></td> |
74 <td><a href="#QtTestResult.addFailure">addFailure</a></td> |
72 <td>Method called if a test failed.</td> |
75 <td>Method called if a test failed.</td> |
|
76 </tr><tr> |
|
77 <td><a href="#QtTestResult.addSkip">addSkip</a></td> |
|
78 <td>Method called if a test was skipped.</td> |
|
79 </tr><tr> |
|
80 <td><a href="#QtTestResult.addUnexpectedSuccess">addUnexpectedSuccess</a></td> |
|
81 <td>Method called if a test succeeded expectedly.</td> |
73 </tr><tr> |
82 </tr><tr> |
74 <td><a href="#QtTestResult.startTest">startTest</a></td> |
83 <td><a href="#QtTestResult.startTest">startTest</a></td> |
75 <td>Method called at the start of a test.</td> |
84 <td>Method called at the start of a test.</td> |
76 </tr><tr> |
85 </tr><tr> |
77 <td><a href="#QtTestResult.stopTest">stopTest</a></td> |
86 <td><a href="#QtTestResult.stopTest">stopTest</a></td> |
94 <p> |
103 <p> |
95 Method called if a test errored. |
104 Method called if a test errored. |
96 </p><dl> |
105 </p><dl> |
97 <dt><i>test</i></dt> |
106 <dt><i>test</i></dt> |
98 <dd> |
107 <dd> |
99 Reference to the test object |
108 reference to the test object |
100 </dd><dt><i>err</i></dt> |
109 </dd><dt><i>err</i></dt> |
101 <dd> |
110 <dd> |
102 The error traceback |
111 error traceback |
|
112 </dd> |
|
113 </dl><a NAME="QtTestResult.addExpectedFailure" ID="QtTestResult.addExpectedFailure"></a> |
|
114 <h4>QtTestResult.addExpectedFailure</h4> |
|
115 <b>addExpectedFailure</b>(<i>test, err</i>) |
|
116 <p> |
|
117 Method called if a test failed expected. |
|
118 </p><dl> |
|
119 <dt><i>test</i></dt> |
|
120 <dd> |
|
121 reference to the test object |
|
122 </dd><dt><i>err</i></dt> |
|
123 <dd> |
|
124 error traceback |
103 </dd> |
125 </dd> |
104 </dl><a NAME="QtTestResult.addFailure" ID="QtTestResult.addFailure"></a> |
126 </dl><a NAME="QtTestResult.addFailure" ID="QtTestResult.addFailure"></a> |
105 <h4>QtTestResult.addFailure</h4> |
127 <h4>QtTestResult.addFailure</h4> |
106 <b>addFailure</b>(<i>test, err</i>) |
128 <b>addFailure</b>(<i>test, err</i>) |
107 <p> |
129 <p> |
108 Method called if a test failed. |
130 Method called if a test failed. |
109 </p><dl> |
131 </p><dl> |
110 <dt><i>test</i></dt> |
132 <dt><i>test</i></dt> |
111 <dd> |
133 <dd> |
112 Reference to the test object |
134 reference to the test object |
113 </dd><dt><i>err</i></dt> |
135 </dd><dt><i>err</i></dt> |
114 <dd> |
136 <dd> |
115 The error traceback |
137 error traceback |
|
138 </dd> |
|
139 </dl><a NAME="QtTestResult.addSkip" ID="QtTestResult.addSkip"></a> |
|
140 <h4>QtTestResult.addSkip</h4> |
|
141 <b>addSkip</b>(<i>test, reason</i>) |
|
142 <p> |
|
143 Method called if a test was skipped. |
|
144 </p><dl> |
|
145 <dt><i>test</i></dt> |
|
146 <dd> |
|
147 reference to the test object |
|
148 </dd><dt><i>reason</i></dt> |
|
149 <dd> |
|
150 reason for skipping the test (string) |
|
151 </dd> |
|
152 </dl><a NAME="QtTestResult.addUnexpectedSuccess" ID="QtTestResult.addUnexpectedSuccess"></a> |
|
153 <h4>QtTestResult.addUnexpectedSuccess</h4> |
|
154 <b>addUnexpectedSuccess</b>(<i>test</i>) |
|
155 <p> |
|
156 Method called if a test succeeded expectedly. |
|
157 </p><dl> |
|
158 <dt><i>test</i></dt> |
|
159 <dd> |
|
160 reference to the test object |
116 </dd> |
161 </dd> |
117 </dl><a NAME="QtTestResult.startTest" ID="QtTestResult.startTest"></a> |
162 </dl><a NAME="QtTestResult.startTest" ID="QtTestResult.startTest"></a> |
118 <h4>QtTestResult.startTest</h4> |
163 <h4>QtTestResult.startTest</h4> |
119 <b>startTest</b>(<i>test</i>) |
164 <b>startTest</b>(<i>test</i>) |
120 <p> |
165 <p> |
206 <td>Public method called if a test errors.</td> |
251 <td>Public method called if a test errors.</td> |
207 </tr><tr> |
252 </tr><tr> |
208 <td><a href="#UnittestDialog.testFailed">testFailed</a></td> |
253 <td><a href="#UnittestDialog.testFailed">testFailed</a></td> |
209 <td>Public method called if a test fails.</td> |
254 <td>Public method called if a test fails.</td> |
210 </tr><tr> |
255 </tr><tr> |
|
256 <td><a href="#UnittestDialog.testFailedExpected">testFailedExpected</a></td> |
|
257 <td>Public method called if a test fails expected.</td> |
|
258 </tr><tr> |
211 <td><a href="#UnittestDialog.testFinished">testFinished</a></td> |
259 <td><a href="#UnittestDialog.testFinished">testFinished</a></td> |
212 <td>Public method called if a test has finished.</td> |
260 <td>Public method called if a test has finished.</td> |
213 </tr><tr> |
261 </tr><tr> |
|
262 <td><a href="#UnittestDialog.testSkipped">testSkipped</a></td> |
|
263 <td>Public method called if a test was skipped.</td> |
|
264 </tr><tr> |
214 <td><a href="#UnittestDialog.testStarted">testStarted</a></td> |
265 <td><a href="#UnittestDialog.testStarted">testStarted</a></td> |
215 <td>Public method called if a test is about to be run.</td> |
266 <td>Public method called if a test is about to be run.</td> |
|
267 </tr><tr> |
|
268 <td><a href="#UnittestDialog.testSucceededUnexpected">testSucceededUnexpected</a></td> |
|
269 <td>Public method called if a test succeeds unexpectedly.</td> |
216 </tr> |
270 </tr> |
217 </table> |
271 </table> |
218 <a NAME="UnittestDialog.__init__" ID="UnittestDialog.__init__"></a> |
272 <a NAME="UnittestDialog.__init__" ID="UnittestDialog.__init__"></a> |
219 <h4>UnittestDialog (Constructor)</h4> |
273 <h4>UnittestDialog (Constructor)</h4> |
220 <b>UnittestDialog</b>(<i>prog=None, dbs=None, ui=None, parent=None, name=None</i>) |
274 <b>UnittestDialog</b>(<i>prog=None, dbs=None, ui=None, parent=None, name=None</i>) |
371 <dt><i>test</i></dt> |
425 <dt><i>test</i></dt> |
372 <dd> |
426 <dd> |
373 name of the failed test (string) |
427 name of the failed test (string) |
374 </dd><dt><i>exc</i></dt> |
428 </dd><dt><i>exc</i></dt> |
375 <dd> |
429 <dd> |
376 string representation of the exception (list of strings) |
430 string representation of the exception (string) |
377 </dd> |
431 </dd> |
378 </dl><a NAME="UnittestDialog.testFailed" ID="UnittestDialog.testFailed"></a> |
432 </dl><a NAME="UnittestDialog.testFailed" ID="UnittestDialog.testFailed"></a> |
379 <h4>UnittestDialog.testFailed</h4> |
433 <h4>UnittestDialog.testFailed</h4> |
380 <b>testFailed</b>(<i>test, exc</i>) |
434 <b>testFailed</b>(<i>test, exc</i>) |
381 <p> |
435 <p> |
384 <dt><i>test</i></dt> |
438 <dt><i>test</i></dt> |
385 <dd> |
439 <dd> |
386 name of the failed test (string) |
440 name of the failed test (string) |
387 </dd><dt><i>exc</i></dt> |
441 </dd><dt><i>exc</i></dt> |
388 <dd> |
442 <dd> |
389 string representation of the exception (list of strings) |
443 string representation of the exception (string) |
|
444 </dd> |
|
445 </dl><a NAME="UnittestDialog.testFailedExpected" ID="UnittestDialog.testFailedExpected"></a> |
|
446 <h4>UnittestDialog.testFailedExpected</h4> |
|
447 <b>testFailedExpected</b>(<i>test, exc</i>) |
|
448 <p> |
|
449 Public method called if a test fails expected. |
|
450 </p><dl> |
|
451 <dt><i>test</i></dt> |
|
452 <dd> |
|
453 name of the failed test (string) |
|
454 </dd><dt><i>exc</i></dt> |
|
455 <dd> |
|
456 string representation of the exception (string) |
390 </dd> |
457 </dd> |
391 </dl><a NAME="UnittestDialog.testFinished" ID="UnittestDialog.testFinished"></a> |
458 </dl><a NAME="UnittestDialog.testFinished" ID="UnittestDialog.testFinished"></a> |
392 <h4>UnittestDialog.testFinished</h4> |
459 <h4>UnittestDialog.testFinished</h4> |
393 <b>testFinished</b>(<i></i>) |
460 <b>testFinished</b>(<i></i>) |
394 <p> |
461 <p> |
395 Public method called if a test has finished. |
462 Public method called if a test has finished. |
396 </p><p> |
463 </p><p> |
397 <b>Note</b>: It is also called if it has already failed or errored. |
464 <b>Note</b>: It is also called if it has already failed or errored. |
398 </p><a NAME="UnittestDialog.testStarted" ID="UnittestDialog.testStarted"></a> |
465 </p><a NAME="UnittestDialog.testSkipped" ID="UnittestDialog.testSkipped"></a> |
|
466 <h4>UnittestDialog.testSkipped</h4> |
|
467 <b>testSkipped</b>(<i>test, reason</i>) |
|
468 <p> |
|
469 Public method called if a test was skipped. |
|
470 </p><dl> |
|
471 <dt><i>test</i></dt> |
|
472 <dd> |
|
473 name of the failed test (string) |
|
474 </dd><dt><i>reason</i></dt> |
|
475 <dd> |
|
476 reason for skipping the test (string) |
|
477 </dd> |
|
478 </dl><a NAME="UnittestDialog.testStarted" ID="UnittestDialog.testStarted"></a> |
399 <h4>UnittestDialog.testStarted</h4> |
479 <h4>UnittestDialog.testStarted</h4> |
400 <b>testStarted</b>(<i>test, doc</i>) |
480 <b>testStarted</b>(<i>test, doc</i>) |
401 <p> |
481 <p> |
402 Public method called if a test is about to be run. |
482 Public method called if a test is about to be run. |
403 </p><dl> |
483 </p><dl> |
405 <dd> |
485 <dd> |
406 name of the started test (string) |
486 name of the started test (string) |
407 </dd><dt><i>doc</i></dt> |
487 </dd><dt><i>doc</i></dt> |
408 <dd> |
488 <dd> |
409 documentation of the started test (string) |
489 documentation of the started test (string) |
|
490 </dd> |
|
491 </dl><a NAME="UnittestDialog.testSucceededUnexpected" ID="UnittestDialog.testSucceededUnexpected"></a> |
|
492 <h4>UnittestDialog.testSucceededUnexpected</h4> |
|
493 <b>testSucceededUnexpected</b>(<i>test</i>) |
|
494 <p> |
|
495 Public method called if a test succeeds unexpectedly. |
|
496 </p><dl> |
|
497 <dt><i>test</i></dt> |
|
498 <dd> |
|
499 name of the failed test (string) |
410 </dd> |
500 </dd> |
411 </dl> |
501 </dl> |
412 <div align="right"><a href="#top">Up</a></div> |
502 <div align="right"><a href="#top">Up</a></div> |
413 <hr /><hr /> |
503 <hr /><hr /> |
414 <a NAME="UnittestWindow" ID="UnittestWindow"></a> |
504 <a NAME="UnittestWindow" ID="UnittestWindow"></a> |