src/eric7/Documentation/Source/eric7.Testing.TestingWidget.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 9097
213951c41dcd
child 9311
8e588f403fd9
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Testing.TestingWidget</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.TestingWidget</h1>
10
11 <p>
12 Module implementing a widget to orchestrate unit test execution.
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="#TestingWidget">TestingWidget</a></td>
25 <td>Class implementing a widget to orchestrate unit test execution.</td>
26 </tr>
27 <tr>
28 <td><a href="#TestingWidgetModes">TestingWidgetModes</a></td>
29 <td>Class defining the various modes of the testing widget.</td>
30 </tr>
31 <tr>
32 <td><a href="#TestingWindow">TestingWindow</a></td>
33 <td>Main window class for the standalone dialog.</td>
34 </tr>
35 </table>
36 <h3>Functions</h3>
37
38 <table>
39
40 <tr>
41 <td><a href="#clearSavedHistories">clearSavedHistories</a></td>
42 <td>Function to clear the saved history lists.</td>
43 </tr>
44 </table>
45 <hr />
46 <hr />
47 <a NAME="TestingWidget" ID="TestingWidget"></a>
48 <h2>TestingWidget</h2>
49
50 <p>
51 Class implementing a widget to orchestrate unit test execution.
52 </p>
53 <h3>Signals</h3>
54 <dl>
55
56 <dt>testFile(str, int, bool)</dt>
57 <dd>
58 emitted to show the source of a
59 test file
60 </dd>
61 <dt>testRunStopped()</dt>
62 <dd>
63 emitted after a test run has finished
64 </dd>
65 </dl>
66 <h3>Derived from</h3>
67 QWidget, Ui_TestingWidget
68 <h3>Class Attributes</h3>
69
70 <table>
71 <tr><td>None</td></tr>
72 </table>
73 <h3>Class Methods</h3>
74
75 <table>
76 <tr><td>None</td></tr>
77 </table>
78 <h3>Methods</h3>
79
80 <table>
81
82 <tr>
83 <td><a href="#TestingWidget.__init__">TestingWidget</a></td>
84 <td>Constructor</td>
85 </tr>
86 <tr>
87 <td><a href="#TestingWidget.__adjustPendingState">__adjustPendingState</a></td>
88 <td>Private method to change the status indicator of all still pending tests to "not run".</td>
89 </tr>
90 <tr>
91 <td><a href="#TestingWidget.__coverageData">__coverageData</a></td>
92 <td>Private slot to handle the 'coverageData' signal of the executor.</td>
93 </tr>
94 <tr>
95 <td><a href="#TestingWidget.__insertDiscovery">__insertDiscovery</a></td>
96 <td>Private slot to insert the discovery start directory into the discoveryPicker object.</td>
97 </tr>
98 <tr>
99 <td><a href="#TestingWidget.__insertHistory">__insertHistory</a></td>
100 <td>Private slot to insert an item into a history object.</td>
101 </tr>
102 <tr>
103 <td><a href="#TestingWidget.__insertTestFile">__insertTestFile</a></td>
104 <td>Private slot to insert a test file name into the testsuitePicker object.</td>
105 </tr>
106 <tr>
107 <td><a href="#TestingWidget.__insertTestName">__insertTestName</a></td>
108 <td>Private slot to insert a test name into the testComboBox object.</td>
109 </tr>
110 <tr>
111 <td><a href="#TestingWidget.__loadRecent">__loadRecent</a></td>
112 <td>Private method to load the most recently used lists.</td>
113 </tr>
114 <tr>
115 <td><a href="#TestingWidget.__openEditor">__openEditor</a></td>
116 <td>Private method to open an editor window for the given file.</td>
117 </tr>
118 <tr>
119 <td><a href="#TestingWidget.__populateTestFrameworkComboBox">__populateTestFrameworkComboBox</a></td>
120 <td>Private method to (re-)populate the test framework selector.</td>
121 </tr>
122 <tr>
123 <td><a href="#TestingWidget.__populateVenvComboBox">__populateVenvComboBox</a></td>
124 <td>Private method to (re-)populate the virtual environments selector.</td>
125 </tr>
126 <tr>
127 <td><a href="#TestingWidget.__processTestResult">__processTestResult</a></td>
128 <td>Private slot to handle the receipt of a test result object.</td>
129 </tr>
130 <tr>
131 <td><a href="#TestingWidget.__projectClosed">__projectClosed</a></td>
132 <td>Private slot to handle a project being closed.</td>
133 </tr>
134 <tr>
135 <td><a href="#TestingWidget.__projectOpened">__projectOpened</a></td>
136 <td>Private slot to handle a project being opened.</td>
137 </tr>
138 <tr>
139 <td><a href="#TestingWidget.__resetResults">__resetResults</a></td>
140 <td>Private slot to reset the test results tab and data.</td>
141 </tr>
142 <tr>
143 <td><a href="#TestingWidget.__saveRecent">__saveRecent</a></td>
144 <td>Private method to save the most recently used lists.</td>
145 </tr>
146 <tr>
147 <td><a href="#TestingWidget.__setIdleMode">__setIdleMode</a></td>
148 <td>Private slot to switch the widget to idle mode.</td>
149 </tr>
150 <tr>
151 <td><a href="#TestingWidget.__setRunningMode">__setRunningMode</a></td>
152 <td>Private slot to switch the widget to running mode.</td>
153 </tr>
154 <tr>
155 <td><a href="#TestingWidget.__setStatusLabel">__setStatusLabel</a></td>
156 <td>Private slot to set the status label to the text sent by the model.</td>
157 </tr>
158 <tr>
159 <td><a href="#TestingWidget.__setStoppedMode">__setStoppedMode</a></td>
160 <td>Private slot to switch the widget to stopped mode.</td>
161 </tr>
162 <tr>
163 <td><a href="#TestingWidget.__showCoverageDialog">__showCoverageDialog</a></td>
164 <td>Private slot to show a code coverage dialog for the most recent test run.</td>
165 </tr>
166 <tr>
167 <td><a href="#TestingWidget.__showLogOutput">__showLogOutput</a></td>
168 <td>Private slot to show the output of the most recent test run.</td>
169 </tr>
170 <tr>
171 <td><a href="#TestingWidget.__showSource">__showSource</a></td>
172 <td>Private slot to show the source of a traceback in an editor.</td>
173 </tr>
174 <tr>
175 <td><a href="#TestingWidget.__stopTests">__stopTests</a></td>
176 <td>Private slot to stop the current test run.</td>
177 </tr>
178 <tr>
179 <td><a href="#TestingWidget.__testProcessFinished">__testProcessFinished</a></td>
180 <td>Private slot to handle the 'testFinished' signal of the executor.</td>
181 </tr>
182 <tr>
183 <td><a href="#TestingWidget.__testRunAboutToBeStarted">__testRunAboutToBeStarted</a></td>
184 <td>Private slot to handle the 'testRunAboutToBeStarted' signal of the executor.</td>
185 </tr>
186 <tr>
187 <td><a href="#TestingWidget.__testRunFinished">__testRunFinished</a></td>
188 <td>Private slot to handle the 'testRunFinished' signal of the executor.</td>
189 </tr>
190 <tr>
191 <td><a href="#TestingWidget.__testStarted">__testStarted</a></td>
192 <td>Private slot handling the 'startTest' signal of the executor.</td>
193 </tr>
194 <tr>
195 <td><a href="#TestingWidget.__testsCollectError">__testsCollectError</a></td>
196 <td>Private slot handling the 'collectError' signal of the executor.</td>
197 </tr>
198 <tr>
199 <td><a href="#TestingWidget.__testsCollected">__testsCollected</a></td>
200 <td>Private slot handling the 'collected' signal of the executor.</td>
201 </tr>
202 <tr>
203 <td><a href="#TestingWidget.__testsStopped">__testsStopped</a></td>
204 <td>Private slot to handle the 'stop' signal of the executor.</td>
205 </tr>
206 <tr>
207 <td><a href="#TestingWidget.__updateButtonBoxButtons">__updateButtonBoxButtons</a></td>
208 <td>Private slot to update the state of the buttons of the button box.</td>
209 </tr>
210 <tr>
211 <td><a href="#TestingWidget.__updateCoverage">__updateCoverage</a></td>
212 <td>Private slot to update the state of the coverage checkbox depending on the selected framework's capabilities.</td>
213 </tr>
214 <tr>
215 <td><a href="#TestingWidget.__updateProgress">__updateProgress</a></td>
216 <td>Private slot update the progress indicators.</td>
217 </tr>
218 <tr>
219 <td><a href="#TestingWidget.clearRecent">clearRecent</a></td>
220 <td>Public slot to clear the recently used lists.</td>
221 </tr>
222 <tr>
223 <td><a href="#TestingWidget.closeEvent">closeEvent</a></td>
224 <td>Protected method to handle the close event.</td>
225 </tr>
226 <tr>
227 <td><a href="#TestingWidget.getFailedTests">getFailedTests</a></td>
228 <td>Public method to get the list of failed tests (if any).</td>
229 </tr>
230 <tr>
231 <td><a href="#TestingWidget.getResultsModel">getResultsModel</a></td>
232 <td>Public method to get a reference to the model containing the test result data.</td>
233 </tr>
234 <tr>
235 <td><a href="#TestingWidget.hasFailedTests">hasFailedTests</a></td>
236 <td>Public method to check for failed tests.</td>
237 </tr>
238 <tr>
239 <td><a href="#TestingWidget.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
240 <td>Private slot called by a button of the button box clicked.</td>
241 </tr>
242 <tr>
243 <td><a href="#TestingWidget.on_discoverCheckBox_toggled">on_discoverCheckBox_toggled</a></td>
244 <td>Private slot handling state changes of the 'discover' checkbox.</td>
245 </tr>
246 <tr>
247 <td><a href="#TestingWidget.on_frameworkComboBox_currentIndexChanged">on_frameworkComboBox_currentIndexChanged</a></td>
248 <td>Private slot handling the selection of a test framework.</td>
249 </tr>
250 <tr>
251 <td><a href="#TestingWidget.on_testsuitePicker_aboutToShowPathPickerDialog">on_testsuitePicker_aboutToShowPathPickerDialog</a></td>
252 <td>Private slot called before the test file selection dialog is shown.</td>
253 </tr>
254 <tr>
255 <td><a href="#TestingWidget.on_venvComboBox_currentIndexChanged">on_venvComboBox_currentIndexChanged</a></td>
256 <td>Private slot handling the selection of a virtual environment.</td>
257 </tr>
258 <tr>
259 <td><a href="#TestingWidget.on_versionsButton_clicked">on_versionsButton_clicked</a></td>
260 <td>Private slot to show the versions of available plugins.</td>
261 </tr>
262 <tr>
263 <td><a href="#TestingWidget.setTestFile">setTestFile</a></td>
264 <td>Public slot to set the given test file as the current one.</td>
265 </tr>
266 <tr>
267 <td><a href="#TestingWidget.startTests">startTests</a></td>
268 <td>Public slot to start the test run.</td>
269 </tr>
270 </table>
271 <h3>Static Methods</h3>
272
273 <table>
274 <tr><td>None</td></tr>
275 </table>
276
277 <a NAME="TestingWidget.__init__" ID="TestingWidget.__init__"></a>
278 <h4>TestingWidget (Constructor)</h4>
279 <b>TestingWidget</b>(<i>testfile=None, parent=None</i>)
280
281 <p>
282 Constructor
283 </p>
284 <dl>
285
286 <dt><i>testfile</i> (str)</dt>
287 <dd>
288 file name of the test to load
289 </dd>
290 <dt><i>parent</i> (QWidget (optional))</dt>
291 <dd>
292 reference to the parent widget (defaults to None)
293 </dd>
294 </dl>
295 <a NAME="TestingWidget.__adjustPendingState" ID="TestingWidget.__adjustPendingState"></a>
296 <h4>TestingWidget.__adjustPendingState</h4>
297 <b>__adjustPendingState</b>(<i></i>)
298
299 <p>
300 Private method to change the status indicator of all still pending
301 tests to "not run".
302 </p>
303 <a NAME="TestingWidget.__coverageData" ID="TestingWidget.__coverageData"></a>
304 <h4>TestingWidget.__coverageData</h4>
305 <b>__coverageData</b>(<i>coverageFile</i>)
306
307 <p>
308 Private slot to handle the 'coverageData' signal of the executor.
309 </p>
310 <dl>
311
312 <dt><i>coverageFile</i> (str)</dt>
313 <dd>
314 file containing the coverage data
315 </dd>
316 </dl>
317 <a NAME="TestingWidget.__insertDiscovery" ID="TestingWidget.__insertDiscovery"></a>
318 <h4>TestingWidget.__insertDiscovery</h4>
319 <b>__insertDiscovery</b>(<i>start</i>)
320
321 <p>
322 Private slot to insert the discovery start directory into the
323 discoveryPicker object.
324 </p>
325 <dl>
326
327 <dt><i>start</i> (str)</dt>
328 <dd>
329 start directory name to be inserted
330 </dd>
331 </dl>
332 <a NAME="TestingWidget.__insertHistory" ID="TestingWidget.__insertHistory"></a>
333 <h4>TestingWidget.__insertHistory</h4>
334 <b>__insertHistory</b>(<i>widget, history, item</i>)
335
336 <p>
337 Private slot to insert an item into a history object.
338 </p>
339 <dl>
340
341 <dt><i>widget</i> (QComboBox or EricComboPathPicker)</dt>
342 <dd>
343 reference to the widget
344 </dd>
345 <dt><i>history</i> (list of str)</dt>
346 <dd>
347 array containing the history
348 </dd>
349 <dt><i>item</i> (str)</dt>
350 <dd>
351 item to be inserted
352 </dd>
353 </dl>
354 <a NAME="TestingWidget.__insertTestFile" ID="TestingWidget.__insertTestFile"></a>
355 <h4>TestingWidget.__insertTestFile</h4>
356 <b>__insertTestFile</b>(<i>prog</i>)
357
358 <p>
359 Private slot to insert a test file name into the testsuitePicker
360 object.
361 </p>
362 <dl>
363
364 <dt><i>prog</i> (str)</dt>
365 <dd>
366 test file name to be inserted
367 </dd>
368 </dl>
369 <a NAME="TestingWidget.__insertTestName" ID="TestingWidget.__insertTestName"></a>
370 <h4>TestingWidget.__insertTestName</h4>
371 <b>__insertTestName</b>(<i>testName</i>)
372
373 <p>
374 Private slot to insert a test name into the testComboBox object.
375 </p>
376 <dl>
377
378 <dt><i>testName</i> (str)</dt>
379 <dd>
380 name of the test to be inserted
381 </dd>
382 </dl>
383 <a NAME="TestingWidget.__loadRecent" ID="TestingWidget.__loadRecent"></a>
384 <h4>TestingWidget.__loadRecent</h4>
385 <b>__loadRecent</b>(<i></i>)
386
387 <p>
388 Private method to load the most recently used lists.
389 </p>
390 <a NAME="TestingWidget.__openEditor" ID="TestingWidget.__openEditor"></a>
391 <h4>TestingWidget.__openEditor</h4>
392 <b>__openEditor</b>(<i>filename, linenumber=1</i>)
393
394 <p>
395 Private method to open an editor window for the given file.
396 </p>
397 <p>
398 Note: This method opens an editor window when the testing dialog
399 is called as a standalone application.
400 </p>
401 <dl>
402
403 <dt><i>filename</i> (str)</dt>
404 <dd>
405 path of the file to be opened
406 </dd>
407 <dt><i>linenumber</i> (int (optional))</dt>
408 <dd>
409 line number to place the cursor at (defaults to 1)
410 </dd>
411 </dl>
412 <a NAME="TestingWidget.__populateTestFrameworkComboBox" ID="TestingWidget.__populateTestFrameworkComboBox"></a>
413 <h4>TestingWidget.__populateTestFrameworkComboBox</h4>
414 <b>__populateTestFrameworkComboBox</b>(<i></i>)
415
416 <p>
417 Private method to (re-)populate the test framework selector.
418 </p>
419 <a NAME="TestingWidget.__populateVenvComboBox" ID="TestingWidget.__populateVenvComboBox"></a>
420 <h4>TestingWidget.__populateVenvComboBox</h4>
421 <b>__populateVenvComboBox</b>(<i></i>)
422
423 <p>
424 Private method to (re-)populate the virtual environments selector.
425 </p>
426 <a NAME="TestingWidget.__processTestResult" ID="TestingWidget.__processTestResult"></a>
427 <h4>TestingWidget.__processTestResult</h4>
428 <b>__processTestResult</b>(<i>result</i>)
429
430 <p>
431 Private slot to handle the receipt of a test result object.
432 </p>
433 <dl>
434
435 <dt><i>result</i> (TestResult)</dt>
436 <dd>
437 test result object
438 </dd>
439 </dl>
440 <a NAME="TestingWidget.__projectClosed" ID="TestingWidget.__projectClosed"></a>
441 <h4>TestingWidget.__projectClosed</h4>
442 <b>__projectClosed</b>(<i></i>)
443
444 <p>
445 Private slot to handle a project being closed.
446 </p>
447 <a NAME="TestingWidget.__projectOpened" ID="TestingWidget.__projectOpened"></a>
448 <h4>TestingWidget.__projectOpened</h4>
449 <b>__projectOpened</b>(<i></i>)
450
451 <p>
452 Private slot to handle a project being opened.
453 </p>
454 <a NAME="TestingWidget.__resetResults" ID="TestingWidget.__resetResults"></a>
455 <h4>TestingWidget.__resetResults</h4>
456 <b>__resetResults</b>(<i></i>)
457
458 <p>
459 Private slot to reset the test results tab and data.
460 </p>
461 <a NAME="TestingWidget.__saveRecent" ID="TestingWidget.__saveRecent"></a>
462 <h4>TestingWidget.__saveRecent</h4>
463 <b>__saveRecent</b>(<i></i>)
464
465 <p>
466 Private method to save the most recently used lists.
467 </p>
468 <a NAME="TestingWidget.__setIdleMode" ID="TestingWidget.__setIdleMode"></a>
469 <h4>TestingWidget.__setIdleMode</h4>
470 <b>__setIdleMode</b>(<i></i>)
471
472 <p>
473 Private slot to switch the widget to idle mode.
474 </p>
475 <a NAME="TestingWidget.__setRunningMode" ID="TestingWidget.__setRunningMode"></a>
476 <h4>TestingWidget.__setRunningMode</h4>
477 <b>__setRunningMode</b>(<i></i>)
478
479 <p>
480 Private slot to switch the widget to running mode.
481 </p>
482 <a NAME="TestingWidget.__setStatusLabel" ID="TestingWidget.__setStatusLabel"></a>
483 <h4>TestingWidget.__setStatusLabel</h4>
484 <b>__setStatusLabel</b>(<i>statusText</i>)
485
486 <p>
487 Private slot to set the status label to the text sent by the model.
488 </p>
489 <dl>
490
491 <dt><i>statusText</i> (str)</dt>
492 <dd>
493 text to be shown
494 </dd>
495 </dl>
496 <a NAME="TestingWidget.__setStoppedMode" ID="TestingWidget.__setStoppedMode"></a>
497 <h4>TestingWidget.__setStoppedMode</h4>
498 <b>__setStoppedMode</b>(<i></i>)
499
500 <p>
501 Private slot to switch the widget to stopped mode.
502 </p>
503 <a NAME="TestingWidget.__showCoverageDialog" ID="TestingWidget.__showCoverageDialog"></a>
504 <h4>TestingWidget.__showCoverageDialog</h4>
505 <b>__showCoverageDialog</b>(<i></i>)
506
507 <p>
508 Private slot to show a code coverage dialog for the most recent test
509 run.
510 </p>
511 <a NAME="TestingWidget.__showLogOutput" ID="TestingWidget.__showLogOutput"></a>
512 <h4>TestingWidget.__showLogOutput</h4>
513 <b>__showLogOutput</b>(<i></i>)
514
515 <p>
516 Private slot to show the output of the most recent test run.
517 </p>
518 <a NAME="TestingWidget.__showSource" ID="TestingWidget.__showSource"></a>
519 <h4>TestingWidget.__showSource</h4>
520 <b>__showSource</b>(<i>filename, lineno</i>)
521
522 <p>
523 Private slot to show the source of a traceback in an editor.
524 </p>
525 <dl>
526
527 <dt><i>filename</i> (str)</dt>
528 <dd>
529 file name of the file to be shown
530 </dd>
531 <dt><i>lineno</i> (int)</dt>
532 <dd>
533 line number to go to in the file
534 </dd>
535 </dl>
536 <a NAME="TestingWidget.__stopTests" ID="TestingWidget.__stopTests"></a>
537 <h4>TestingWidget.__stopTests</h4>
538 <b>__stopTests</b>(<i></i>)
539
540 <p>
541 Private slot to stop the current test run.
542 </p>
543 <a NAME="TestingWidget.__testProcessFinished" ID="TestingWidget.__testProcessFinished"></a>
544 <h4>TestingWidget.__testProcessFinished</h4>
545 <b>__testProcessFinished</b>(<i>results, output</i>)
546
547 <p>
548 Private slot to handle the 'testFinished' signal of the executor.
549 </p>
550 <dl>
551
552 <dt><i>results</i> (list of TestResult)</dt>
553 <dd>
554 list of test result objects (if not sent via the
555 'testResult' signal
556 </dd>
557 <dt><i>output</i> (str)</dt>
558 <dd>
559 string containing the test process output (if any)
560 </dd>
561 </dl>
562 <a NAME="TestingWidget.__testRunAboutToBeStarted" ID="TestingWidget.__testRunAboutToBeStarted"></a>
563 <h4>TestingWidget.__testRunAboutToBeStarted</h4>
564 <b>__testRunAboutToBeStarted</b>(<i></i>)
565
566 <p>
567 Private slot to handle the 'testRunAboutToBeStarted' signal of the
568 executor.
569 </p>
570 <a NAME="TestingWidget.__testRunFinished" ID="TestingWidget.__testRunFinished"></a>
571 <h4>TestingWidget.__testRunFinished</h4>
572 <b>__testRunFinished</b>(<i>noTests, duration</i>)
573
574 <p>
575 Private slot to handle the 'testRunFinished' signal of the executor.
576 </p>
577 <dl>
578
579 <dt><i>noTests</i> (int)</dt>
580 <dd>
581 number of tests run by the executor
582 </dd>
583 <dt><i>duration</i> (float)</dt>
584 <dd>
585 time needed in seconds to run the tests
586 </dd>
587 </dl>
588 <a NAME="TestingWidget.__testStarted" ID="TestingWidget.__testStarted"></a>
589 <h4>TestingWidget.__testStarted</h4>
590 <b>__testStarted</b>(<i>test</i>)
591
592 <p>
593 Private slot handling the 'startTest' signal of the executor.
594 </p>
595 <dl>
596
597 <dt><i>test</i> (tuple of (str, str, str))</dt>
598 <dd>
599 tuple containing the id, name and short description of the
600 tests about to be run
601 </dd>
602 </dl>
603 <a NAME="TestingWidget.__testsCollectError" ID="TestingWidget.__testsCollectError"></a>
604 <h4>TestingWidget.__testsCollectError</h4>
605 <b>__testsCollectError</b>(<i>errors</i>)
606
607 <p>
608 Private slot handling the 'collectError' signal of the executor.
609 </p>
610 <dl>
611
612 <dt><i>errors</i> (list of tuple of (str, str))</dt>
613 <dd>
614 list of tuples containing the test name and a description
615 of the error
616 </dd>
617 </dl>
618 <a NAME="TestingWidget.__testsCollected" ID="TestingWidget.__testsCollected"></a>
619 <h4>TestingWidget.__testsCollected</h4>
620 <b>__testsCollected</b>(<i>testNames</i>)
621
622 <p>
623 Private slot handling the 'collected' signal of the executor.
624 </p>
625 <dl>
626
627 <dt><i>testNames</i> (list of tuple of (str, str, str))</dt>
628 <dd>
629 list of tuples containing the test id, the test name
630 and a description of collected tests
631 </dd>
632 </dl>
633 <a NAME="TestingWidget.__testsStopped" ID="TestingWidget.__testsStopped"></a>
634 <h4>TestingWidget.__testsStopped</h4>
635 <b>__testsStopped</b>(<i></i>)
636
637 <p>
638 Private slot to handle the 'stop' signal of the executor.
639 </p>
640 <a NAME="TestingWidget.__updateButtonBoxButtons" ID="TestingWidget.__updateButtonBoxButtons"></a>
641 <h4>TestingWidget.__updateButtonBoxButtons</h4>
642 <b>__updateButtonBoxButtons</b>(<i></i>)
643
644 <p>
645 Private slot to update the state of the buttons of the button box.
646 </p>
647 <a NAME="TestingWidget.__updateCoverage" ID="TestingWidget.__updateCoverage"></a>
648 <h4>TestingWidget.__updateCoverage</h4>
649 <b>__updateCoverage</b>(<i></i>)
650
651 <p>
652 Private slot to update the state of the coverage checkbox depending on
653 the selected framework's capabilities.
654 </p>
655 <a NAME="TestingWidget.__updateProgress" ID="TestingWidget.__updateProgress"></a>
656 <h4>TestingWidget.__updateProgress</h4>
657 <b>__updateProgress</b>(<i></i>)
658
659 <p>
660 Private slot update the progress indicators.
661 </p>
662 <a NAME="TestingWidget.clearRecent" ID="TestingWidget.clearRecent"></a>
663 <h4>TestingWidget.clearRecent</h4>
664 <b>clearRecent</b>(<i></i>)
665
666 <p>
667 Public slot to clear the recently used lists.
668 </p>
669 <a NAME="TestingWidget.closeEvent" ID="TestingWidget.closeEvent"></a>
670 <h4>TestingWidget.closeEvent</h4>
671 <b>closeEvent</b>(<i>event</i>)
672
673 <p>
674 Protected method to handle the close event.
675 </p>
676 <dl>
677
678 <dt><i>event</i> (QCloseEvent)</dt>
679 <dd>
680 close event
681 </dd>
682 </dl>
683 <a NAME="TestingWidget.getFailedTests" ID="TestingWidget.getFailedTests"></a>
684 <h4>TestingWidget.getFailedTests</h4>
685 <b>getFailedTests</b>(<i></i>)
686
687 <p>
688 Public method to get the list of failed tests (if any).
689 </p>
690 <dl>
691 <dt>Return:</dt>
692 <dd>
693 list of IDs of failed tests
694 </dd>
695 </dl>
696 <dl>
697 <dt>Return Type:</dt>
698 <dd>
699 list of str
700 </dd>
701 </dl>
702 <a NAME="TestingWidget.getResultsModel" ID="TestingWidget.getResultsModel"></a>
703 <h4>TestingWidget.getResultsModel</h4>
704 <b>getResultsModel</b>(<i></i>)
705
706 <p>
707 Public method to get a reference to the model containing the test
708 result data.
709 </p>
710 <dl>
711 <dt>Return:</dt>
712 <dd>
713 reference to the test results model
714 </dd>
715 </dl>
716 <dl>
717 <dt>Return Type:</dt>
718 <dd>
719 TestResultsModel
720 </dd>
721 </dl>
722 <a NAME="TestingWidget.hasFailedTests" ID="TestingWidget.hasFailedTests"></a>
723 <h4>TestingWidget.hasFailedTests</h4>
724 <b>hasFailedTests</b>(<i></i>)
725
726 <p>
727 Public method to check for failed tests.
728 </p>
729 <dl>
730 <dt>Return:</dt>
731 <dd>
732 flag indicating the existence of failed tests
733 </dd>
734 </dl>
735 <dl>
736 <dt>Return Type:</dt>
737 <dd>
738 bool
739 </dd>
740 </dl>
741 <a NAME="TestingWidget.on_buttonBox_clicked" ID="TestingWidget.on_buttonBox_clicked"></a>
742 <h4>TestingWidget.on_buttonBox_clicked</h4>
743 <b>on_buttonBox_clicked</b>(<i>button</i>)
744
745 <p>
746 Private slot called by a button of the button box clicked.
747 </p>
748 <dl>
749
750 <dt><i>button</i> (QAbstractButton)</dt>
751 <dd>
752 button that was clicked
753 </dd>
754 </dl>
755 <a NAME="TestingWidget.on_discoverCheckBox_toggled" ID="TestingWidget.on_discoverCheckBox_toggled"></a>
756 <h4>TestingWidget.on_discoverCheckBox_toggled</h4>
757 <b>on_discoverCheckBox_toggled</b>(<i>checked</i>)
758
759 <p>
760 Private slot handling state changes of the 'discover' checkbox.
761 </p>
762 <dl>
763
764 <dt><i>checked</i> (bool)</dt>
765 <dd>
766 state of the checkbox
767 </dd>
768 </dl>
769 <a NAME="TestingWidget.on_frameworkComboBox_currentIndexChanged" ID="TestingWidget.on_frameworkComboBox_currentIndexChanged"></a>
770 <h4>TestingWidget.on_frameworkComboBox_currentIndexChanged</h4>
771 <b>on_frameworkComboBox_currentIndexChanged</b>(<i>index</i>)
772
773 <p>
774 Private slot handling the selection of a test framework.
775 </p>
776 <dl>
777
778 <dt><i>index</i> (int)</dt>
779 <dd>
780 index of the selected framework
781 </dd>
782 </dl>
783 <a NAME="TestingWidget.on_testsuitePicker_aboutToShowPathPickerDialog" ID="TestingWidget.on_testsuitePicker_aboutToShowPathPickerDialog"></a>
784 <h4>TestingWidget.on_testsuitePicker_aboutToShowPathPickerDialog</h4>
785 <b>on_testsuitePicker_aboutToShowPathPickerDialog</b>(<i></i>)
786
787 <p>
788 Private slot called before the test file selection dialog is shown.
789 </p>
790 <a NAME="TestingWidget.on_venvComboBox_currentIndexChanged" ID="TestingWidget.on_venvComboBox_currentIndexChanged"></a>
791 <h4>TestingWidget.on_venvComboBox_currentIndexChanged</h4>
792 <b>on_venvComboBox_currentIndexChanged</b>(<i>index</i>)
793
794 <p>
795 Private slot handling the selection of a virtual environment.
796 </p>
797 <dl>
798
799 <dt><i>index</i> (int)</dt>
800 <dd>
801 index of the selected environment
802 </dd>
803 </dl>
804 <a NAME="TestingWidget.on_versionsButton_clicked" ID="TestingWidget.on_versionsButton_clicked"></a>
805 <h4>TestingWidget.on_versionsButton_clicked</h4>
806 <b>on_versionsButton_clicked</b>(<i></i>)
807
808 <p>
809 Private slot to show the versions of available plugins.
810 </p>
811 <a NAME="TestingWidget.setTestFile" ID="TestingWidget.setTestFile"></a>
812 <h4>TestingWidget.setTestFile</h4>
813 <b>setTestFile</b>(<i>testFile, forProject=False</i>)
814
815 <p>
816 Public slot to set the given test file as the current one.
817 </p>
818 <dl>
819
820 <dt><i>testFile</i> (str)</dt>
821 <dd>
822 path of the test file
823 </dd>
824 <dt><i>forProject</i> (bool (optional))</dt>
825 <dd>
826 flag indicating that this call is for a project
827 (defaults to False)
828 </dd>
829 </dl>
830 <a NAME="TestingWidget.startTests" ID="TestingWidget.startTests"></a>
831 <h4>TestingWidget.startTests</h4>
832 <b>startTests</b>(<i>failedOnly=False</i>)
833
834 <p>
835 Public slot to start the test run.
836 </p>
837 <dl>
838
839 <dt><i>failedOnly</i> (bool)</dt>
840 <dd>
841 flag indicating to run only failed tests
842 </dd>
843 </dl>
844 <div align="right"><a href="#top">Up</a></div>
845 <hr />
846 <hr />
847 <a NAME="TestingWidgetModes" ID="TestingWidgetModes"></a>
848 <h2>TestingWidgetModes</h2>
849
850 <p>
851 Class defining the various modes of the testing widget.
852 </p>
853 <h3>Derived from</h3>
854 enum.Enum
855 <h3>Class Attributes</h3>
856
857 <table>
858 <tr><td>IDLE</td></tr><tr><td>RUNNING</td></tr><tr><td>STOPPED</td></tr>
859 </table>
860 <h3>Class Methods</h3>
861
862 <table>
863 <tr><td>None</td></tr>
864 </table>
865 <h3>Methods</h3>
866
867 <table>
868 <tr><td>None</td></tr>
869 </table>
870 <h3>Static Methods</h3>
871
872 <table>
873 <tr><td>None</td></tr>
874 </table>
875
876 <div align="right"><a href="#top">Up</a></div>
877 <hr />
878 <hr />
879 <a NAME="TestingWindow" ID="TestingWindow"></a>
880 <h2>TestingWindow</h2>
881
882 <p>
883 Main window class for the standalone dialog.
884 </p>
885 <h3>Derived from</h3>
886 EricMainWindow
887 <h3>Class Attributes</h3>
888
889 <table>
890 <tr><td>None</td></tr>
891 </table>
892 <h3>Class Methods</h3>
893
894 <table>
895 <tr><td>None</td></tr>
896 </table>
897 <h3>Methods</h3>
898
899 <table>
900
901 <tr>
902 <td><a href="#TestingWindow.__init__">TestingWindow</a></td>
903 <td>Constructor</td>
904 </tr>
905 <tr>
906 <td><a href="#TestingWindow.eventFilter">eventFilter</a></td>
907 <td>Public method to filter events.</td>
908 </tr>
909 </table>
910 <h3>Static Methods</h3>
911
912 <table>
913 <tr><td>None</td></tr>
914 </table>
915
916 <a NAME="TestingWindow.__init__" ID="TestingWindow.__init__"></a>
917 <h4>TestingWindow (Constructor)</h4>
918 <b>TestingWindow</b>(<i>testfile=None, parent=None</i>)
919
920 <p>
921 Constructor
922 </p>
923 <dl>
924
925 <dt><i>testfile</i> (str)</dt>
926 <dd>
927 file name of the test script to open
928 </dd>
929 <dt><i>parent</i> (QWidget)</dt>
930 <dd>
931 reference to the parent widget
932 </dd>
933 </dl>
934 <a NAME="TestingWindow.eventFilter" ID="TestingWindow.eventFilter"></a>
935 <h4>TestingWindow.eventFilter</h4>
936 <b>eventFilter</b>(<i>obj, event</i>)
937
938 <p>
939 Public method to filter events.
940 </p>
941 <dl>
942
943 <dt><i>obj</i></dt>
944 <dd>
945 reference to the object the event is meant for (QObject)
946 </dd>
947 <dt><i>event</i></dt>
948 <dd>
949 reference to the event object (QEvent)
950 </dd>
951 </dl>
952 <dl>
953 <dt>Return:</dt>
954 <dd>
955 flag indicating, whether the event was handled (boolean)
956 </dd>
957 </dl>
958 <div align="right"><a href="#top">Up</a></div>
959 <hr />
960 <hr />
961 <a NAME="clearSavedHistories" ID="clearSavedHistories"></a>
962 <h2>clearSavedHistories</h2>
963 <b>clearSavedHistories</b>(<i>self</i>)
964
965 <p>
966 Function to clear the saved history lists.
967 </p>
968 <div align="right"><a href="#top">Up</a></div>
969 <hr />
970 </body></html>

eric ide

mercurial