src/eric7/Documentation/Source/eric7.DataViews.PyCoverageDialog.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 9097
213951c41dcd
child 10076
649f7ca537ea
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.DataViews.PyCoverageDialog</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.DataViews.PyCoverageDialog</h1>
10
11 <p>
12 Module implementing a Python code coverage dialog.
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="#PyCoverageDialog">PyCoverageDialog</a></td>
25 <td>Class implementing a dialog to display the collected code coverage data.</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="PyCoverageDialog" ID="PyCoverageDialog"></a>
36 <h2>PyCoverageDialog</h2>
37
38 <p>
39 Class implementing a dialog to display the collected code coverage data.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>openFile(str)</dt>
45 <dd>
46 emitted to open the given file in an editor
47 </dd>
48 </dl>
49 <h3>Derived from</h3>
50 QDialog, Ui_PyCoverageDialog
51 <h3>Class Attributes</h3>
52
53 <table>
54 <tr><td>None</td></tr>
55 </table>
56 <h3>Class Methods</h3>
57
58 <table>
59 <tr><td>None</td></tr>
60 </table>
61 <h3>Methods</h3>
62
63 <table>
64
65 <tr>
66 <td><a href="#PyCoverageDialog.__init__">PyCoverageDialog</a></td>
67 <td>Constructor</td>
68 </tr>
69 <tr>
70 <td><a href="#PyCoverageDialog.__createResultItem">__createResultItem</a></td>
71 <td>Private method to create an entry in the result list.</td>
72 </tr>
73 <tr>
74 <td><a href="#PyCoverageDialog.__erase">__erase</a></td>
75 <td>Private slot to handle the erase context menu action.</td>
76 </tr>
77 <tr>
78 <td><a href="#PyCoverageDialog.__finish">__finish</a></td>
79 <td>Private slot called when the action finished or the user pressed the button.</td>
80 </tr>
81 <tr>
82 <td><a href="#PyCoverageDialog.__format_lines">__format_lines</a></td>
83 <td>Private method to format a list of integers into string by coalescing groups.</td>
84 </tr>
85 <tr>
86 <td><a href="#PyCoverageDialog.__htmlReport">__htmlReport</a></td>
87 <td>Private slot to generate a HTML report of the shown data.</td>
88 </tr>
89 <tr>
90 <td><a href="#PyCoverageDialog.__jsonReport">__jsonReport</a></td>
91 <td>Private slot to generate a JSON report of the shown data.</td>
92 </tr>
93 <tr>
94 <td><a href="#PyCoverageDialog.__lcovReport">__lcovReport</a></td>
95 <td>Private slot to generate a LCOV report of the shown data.</td>
96 </tr>
97 <tr>
98 <td><a href="#PyCoverageDialog.__openFile">__openFile</a></td>
99 <td>Private slot to open the selected file.</td>
100 </tr>
101 <tr>
102 <td><a href="#PyCoverageDialog.__prepareReportGeneration">__prepareReportGeneration</a></td>
103 <td>Private method to prepare a report generation.</td>
104 </tr>
105 <tr>
106 <td><a href="#PyCoverageDialog.__showContextMenu">__showContextMenu</a></td>
107 <td>Private slot to show the context menu of the listview.</td>
108 </tr>
109 <tr>
110 <td><a href="#PyCoverageDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
111 <td>Private slot called by a button of the button box clicked.</td>
112 </tr>
113 <tr>
114 <td><a href="#PyCoverageDialog.on_reloadButton_clicked">on_reloadButton_clicked</a></td>
115 <td>Private slot to reload the coverage info.</td>
116 </tr>
117 <tr>
118 <td><a href="#PyCoverageDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
119 <td>Private slot to handle the activation of an item.</td>
120 </tr>
121 <tr>
122 <td><a href="#PyCoverageDialog.start">start</a></td>
123 <td>Public slot to start the coverage data evaluation.</td>
124 </tr>
125 <tr>
126 <td><a href="#PyCoverageDialog.stringify">stringify</a></td>
127 <td>Private helper function to generate a string representation of a pair.</td>
128 </tr>
129 </table>
130 <h3>Static Methods</h3>
131
132 <table>
133 <tr><td>None</td></tr>
134 </table>
135
136 <a NAME="PyCoverageDialog.__init__" ID="PyCoverageDialog.__init__"></a>
137 <h4>PyCoverageDialog (Constructor)</h4>
138 <b>PyCoverageDialog</b>(<i>parent=None</i>)
139
140 <p>
141 Constructor
142 </p>
143 <dl>
144
145 <dt><i>parent</i> (QWidget)</dt>
146 <dd>
147 parent widget
148 </dd>
149 </dl>
150 <a NAME="PyCoverageDialog.__createResultItem" ID="PyCoverageDialog.__createResultItem"></a>
151 <h4>PyCoverageDialog.__createResultItem</h4>
152 <b>__createResultItem</b>(<i>file, statements, executed, coverage, excluded, missing</i>)
153
154 <p>
155 Private method to create an entry in the result list.
156 </p>
157 <dl>
158
159 <dt><i>file</i> (str)</dt>
160 <dd>
161 filename of file
162 </dd>
163 <dt><i>statements</i> (int)</dt>
164 <dd>
165 number of statements
166 </dd>
167 <dt><i>executed</i> (int)</dt>
168 <dd>
169 number of executed statements
170 </dd>
171 <dt><i>coverage</i> (int)</dt>
172 <dd>
173 percent of coverage
174 </dd>
175 <dt><i>excluded</i> (str)</dt>
176 <dd>
177 list of excluded lines
178 </dd>
179 <dt><i>missing</i> (str)</dt>
180 <dd>
181 list of lines without coverage
182 </dd>
183 </dl>
184 <a NAME="PyCoverageDialog.__erase" ID="PyCoverageDialog.__erase"></a>
185 <h4>PyCoverageDialog.__erase</h4>
186 <b>__erase</b>(<i></i>)
187
188 <p>
189 Private slot to handle the erase context menu action.
190 </p>
191 <p>
192 This method erases the collected coverage data that is
193 stored in the .coverage file.
194 </p>
195 <a NAME="PyCoverageDialog.__finish" ID="PyCoverageDialog.__finish"></a>
196 <h4>PyCoverageDialog.__finish</h4>
197 <b>__finish</b>(<i></i>)
198
199 <p>
200 Private slot called when the action finished or the user pressed the
201 button.
202 </p>
203 <a NAME="PyCoverageDialog.__format_lines" ID="PyCoverageDialog.__format_lines"></a>
204 <h4>PyCoverageDialog.__format_lines</h4>
205 <b>__format_lines</b>(<i>lines</i>)
206
207 <p>
208 Private method to format a list of integers into string by coalescing
209 groups.
210 </p>
211 <dl>
212
213 <dt><i>lines</i> (list of int)</dt>
214 <dd>
215 list of integers
216 </dd>
217 </dl>
218 <dl>
219 <dt>Return:</dt>
220 <dd>
221 string representing the list
222 </dd>
223 </dl>
224 <dl>
225 <dt>Return Type:</dt>
226 <dd>
227 str
228 </dd>
229 </dl>
230 <a NAME="PyCoverageDialog.__htmlReport" ID="PyCoverageDialog.__htmlReport"></a>
231 <h4>PyCoverageDialog.__htmlReport</h4>
232 <b>__htmlReport</b>(<i></i>)
233
234 <p>
235 Private slot to generate a HTML report of the shown data.
236 </p>
237 <a NAME="PyCoverageDialog.__jsonReport" ID="PyCoverageDialog.__jsonReport"></a>
238 <h4>PyCoverageDialog.__jsonReport</h4>
239 <b>__jsonReport</b>(<i></i>)
240
241 <p>
242 Private slot to generate a JSON report of the shown data.
243 </p>
244 <a NAME="PyCoverageDialog.__lcovReport" ID="PyCoverageDialog.__lcovReport"></a>
245 <h4>PyCoverageDialog.__lcovReport</h4>
246 <b>__lcovReport</b>(<i></i>)
247
248 <p>
249 Private slot to generate a LCOV report of the shown data.
250 </p>
251 <a NAME="PyCoverageDialog.__openFile" ID="PyCoverageDialog.__openFile"></a>
252 <h4>PyCoverageDialog.__openFile</h4>
253 <b>__openFile</b>(<i>itm=None</i>)
254
255 <p>
256 Private slot to open the selected file.
257 </p>
258 <dl>
259
260 <dt><i>itm</i> (QTreeWidgetItem)</dt>
261 <dd>
262 reference to the item to be opened
263 </dd>
264 </dl>
265 <a NAME="PyCoverageDialog.__prepareReportGeneration" ID="PyCoverageDialog.__prepareReportGeneration"></a>
266 <h4>PyCoverageDialog.__prepareReportGeneration</h4>
267 <b>__prepareReportGeneration</b>(<i></i>)
268
269 <p>
270 Private method to prepare a report generation.
271 </p>
272 <dl>
273 <dt>Return:</dt>
274 <dd>
275 tuple containing a reference to the Coverage object and the
276 list of files to report
277 </dd>
278 </dl>
279 <dl>
280 <dt>Return Type:</dt>
281 <dd>
282 tuple of (Coverage, list of str)
283 </dd>
284 </dl>
285 <a NAME="PyCoverageDialog.__showContextMenu" ID="PyCoverageDialog.__showContextMenu"></a>
286 <h4>PyCoverageDialog.__showContextMenu</h4>
287 <b>__showContextMenu</b>(<i>coord</i>)
288
289 <p>
290 Private slot to show the context menu of the listview.
291 </p>
292 <dl>
293
294 <dt><i>coord</i> (QPoint)</dt>
295 <dd>
296 position of the mouse pointer
297 </dd>
298 </dl>
299 <a NAME="PyCoverageDialog.on_buttonBox_clicked" ID="PyCoverageDialog.on_buttonBox_clicked"></a>
300 <h4>PyCoverageDialog.on_buttonBox_clicked</h4>
301 <b>on_buttonBox_clicked</b>(<i>button</i>)
302
303 <p>
304 Private slot called by a button of the button box clicked.
305 </p>
306 <dl>
307
308 <dt><i>button</i> (QAbstractButton)</dt>
309 <dd>
310 button that was clicked
311 </dd>
312 </dl>
313 <a NAME="PyCoverageDialog.on_reloadButton_clicked" ID="PyCoverageDialog.on_reloadButton_clicked"></a>
314 <h4>PyCoverageDialog.on_reloadButton_clicked</h4>
315 <b>on_reloadButton_clicked</b>(<i></i>)
316
317 <p>
318 Private slot to reload the coverage info.
319 </p>
320 <a NAME="PyCoverageDialog.on_resultList_itemActivated" ID="PyCoverageDialog.on_resultList_itemActivated"></a>
321 <h4>PyCoverageDialog.on_resultList_itemActivated</h4>
322 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
323
324 <p>
325 Private slot to handle the activation of an item.
326 </p>
327 <dl>
328
329 <dt><i>item</i></dt>
330 <dd>
331 reference to the activated item (QTreeWidgetItem)
332 </dd>
333 <dt><i>column</i></dt>
334 <dd>
335 column the item was activated in (integer)
336 </dd>
337 </dl>
338 <a NAME="PyCoverageDialog.start" ID="PyCoverageDialog.start"></a>
339 <h4>PyCoverageDialog.start</h4>
340 <b>start</b>(<i>cfn, fn</i>)
341
342 <p>
343 Public slot to start the coverage data evaluation.
344 </p>
345 <dl>
346
347 <dt><i>cfn</i> (str)</dt>
348 <dd>
349 basename of the coverage file
350 </dd>
351 <dt><i>fn</i> (str or list of str)</dt>
352 <dd>
353 file or list of files or directory to be checked
354 </dd>
355 </dl>
356 <a NAME="PyCoverageDialog.stringify" ID="PyCoverageDialog.stringify"></a>
357 <h4>PyCoverageDialog.stringify</h4>
358 <b>stringify</b>(<i></i>)
359
360 <p>
361 Private helper function to generate a string representation of a
362 pair.
363 </p>
364 <dl>
365
366 <dt><i>pair</i> (tuple of (int, int)</dt>
367 <dd>
368 pair of integers
369 </dd>
370 </dl>
371 <dl>
372 <dt>Return:</dt>
373 <dd>
374 representation of the pair
375 </dd>
376 </dl>
377 <dl>
378 <dt>Return Type:</dt>
379 <dd>
380 str
381 </dd>
382 </dl>
383 <div align="right"><a href="#top">Up</a></div>
384 <hr />
385 </body></html>

eric ide

mercurial