eric6/Documentation/Source/eric6.DataViews.PyCoverageDialog.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7989
a21d673a8f99
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.DataViews.PyCoverageDialog</h1> 23 <h1>eric6.DataViews.PyCoverageDialog</h1>
24
23 <p> 25 <p>
24 Module implementing a Python code coverage dialog. 26 Module implementing a Python code coverage dialog.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#PyCoverageDialog">PyCoverageDialog</a></td> 38 <td><a href="#PyCoverageDialog">PyCoverageDialog</a></td>
34 <td>Class implementing a dialog to display the collected code coverage data.</td> 39 <td>Class implementing a dialog to display the collected code coverage data.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="PyCoverageDialog" ID="PyCoverageDialog"></a> 49 <a NAME="PyCoverageDialog" ID="PyCoverageDialog"></a>
43 <h2>PyCoverageDialog</h2> 50 <h2>PyCoverageDialog</h2>
51
44 <p> 52 <p>
45 Class implementing a dialog to display the collected code coverage data. 53 Class implementing a dialog to display the collected code coverage data.
46 </p> 54 </p>
47 <h3>Derived from</h3> 55 <h3>Derived from</h3>
48 QDialog, Ui_PyCoverageDialog 56 QDialog, Ui_PyCoverageDialog
49 <h3>Class Attributes</h3> 57 <h3>Class Attributes</h3>
58
50 <table> 59 <table>
51 <tr><td>None</td></tr> 60 <tr><td>None</td></tr>
52 </table> 61 </table>
53 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
63
54 <table> 64 <table>
55 <tr><td>None</td></tr> 65 <tr><td>None</td></tr>
56 </table> 66 </table>
57 <h3>Methods</h3> 67 <h3>Methods</h3>
58 <table> 68
69 <table>
70
59 <tr> 71 <tr>
60 <td><a href="#PyCoverageDialog.__init__">PyCoverageDialog</a></td> 72 <td><a href="#PyCoverageDialog.__init__">PyCoverageDialog</a></td>
61 <td>Constructor</td> 73 <td>Constructor</td>
62 </tr><tr> 74 </tr>
75 <tr>
63 <td><a href="#PyCoverageDialog.__annotate">__annotate</a></td> 76 <td><a href="#PyCoverageDialog.__annotate">__annotate</a></td>
64 <td>Private slot to handle the annotate context menu action.</td> 77 <td>Private slot to handle the annotate context menu action.</td>
65 </tr><tr> 78 </tr>
79 <tr>
66 <td><a href="#PyCoverageDialog.__annotateAll">__annotateAll</a></td> 80 <td><a href="#PyCoverageDialog.__annotateAll">__annotateAll</a></td>
67 <td>Private slot to handle the annotate all context menu action.</td> 81 <td>Private slot to handle the annotate all context menu action.</td>
68 </tr><tr> 82 </tr>
83 <tr>
69 <td><a href="#PyCoverageDialog.__createResultItem">__createResultItem</a></td> 84 <td><a href="#PyCoverageDialog.__createResultItem">__createResultItem</a></td>
70 <td>Private method to create an entry in the result list.</td> 85 <td>Private method to create an entry in the result list.</td>
71 </tr><tr> 86 </tr>
87 <tr>
72 <td><a href="#PyCoverageDialog.__deleteAnnotated">__deleteAnnotated</a></td> 88 <td><a href="#PyCoverageDialog.__deleteAnnotated">__deleteAnnotated</a></td>
73 <td>Private slot to handle the delete annotated context menu action.</td> 89 <td>Private slot to handle the delete annotated context menu action.</td>
74 </tr><tr> 90 </tr>
91 <tr>
75 <td><a href="#PyCoverageDialog.__erase">__erase</a></td> 92 <td><a href="#PyCoverageDialog.__erase">__erase</a></td>
76 <td>Private slot to handle the erase context menu action.</td> 93 <td>Private slot to handle the erase context menu action.</td>
77 </tr><tr> 94 </tr>
95 <tr>
78 <td><a href="#PyCoverageDialog.__finish">__finish</a></td> 96 <td><a href="#PyCoverageDialog.__finish">__finish</a></td>
79 <td>Private slot called when the action finished or the user pressed the button.</td> 97 <td>Private slot called when the action finished or the user pressed the button.</td>
80 </tr><tr> 98 </tr>
99 <tr>
81 <td><a href="#PyCoverageDialog.__format_lines">__format_lines</a></td> 100 <td><a href="#PyCoverageDialog.__format_lines">__format_lines</a></td>
82 <td>Private method to format a list of integers into string by coalescing groups.</td> 101 <td>Private method to format a list of integers into string by coalescing groups.</td>
83 </tr><tr> 102 </tr>
103 <tr>
84 <td><a href="#PyCoverageDialog.__openFile">__openFile</a></td> 104 <td><a href="#PyCoverageDialog.__openFile">__openFile</a></td>
85 <td>Private slot to open the selected file.</td> 105 <td>Private slot to open the selected file.</td>
86 </tr><tr> 106 </tr>
107 <tr>
87 <td><a href="#PyCoverageDialog.__showContextMenu">__showContextMenu</a></td> 108 <td><a href="#PyCoverageDialog.__showContextMenu">__showContextMenu</a></td>
88 <td>Private slot to show the context menu of the listview.</td> 109 <td>Private slot to show the context menu of the listview.</td>
89 </tr><tr> 110 </tr>
111 <tr>
90 <td><a href="#PyCoverageDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> 112 <td><a href="#PyCoverageDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
91 <td>Private slot called by a button of the button box clicked.</td> 113 <td>Private slot called by a button of the button box clicked.</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#PyCoverageDialog.on_reloadButton_clicked">on_reloadButton_clicked</a></td> 116 <td><a href="#PyCoverageDialog.on_reloadButton_clicked">on_reloadButton_clicked</a></td>
94 <td>Private slot to reload the coverage info.</td> 117 <td>Private slot to reload the coverage info.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#PyCoverageDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> 120 <td><a href="#PyCoverageDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
97 <td>Private slot to handle the activation of an item.</td> 121 <td>Private slot to handle the activation of an item.</td>
98 </tr><tr> 122 </tr>
123 <tr>
99 <td><a href="#PyCoverageDialog.start">start</a></td> 124 <td><a href="#PyCoverageDialog.start">start</a></td>
100 <td>Public slot to start the coverage data evaluation.</td> 125 <td>Public slot to start the coverage data evaluation.</td>
101 </tr><tr> 126 </tr>
127 <tr>
102 <td><a href="#PyCoverageDialog.stringify">stringify</a></td> 128 <td><a href="#PyCoverageDialog.stringify">stringify</a></td>
103 <td>Private helper function to generate a string representation of a pair.</td> 129 <td>Private helper function to generate a string representation of a pair.</td>
104 </tr> 130 </tr>
105 </table> 131 </table>
106 <h3>Static Methods</h3> 132 <h3>Static Methods</h3>
107 <table> 133
108 <tr><td>None</td></tr> 134 <table>
109 </table> 135 <tr><td>None</td></tr>
136 </table>
137
110 <a NAME="PyCoverageDialog.__init__" ID="PyCoverageDialog.__init__"></a> 138 <a NAME="PyCoverageDialog.__init__" ID="PyCoverageDialog.__init__"></a>
111 <h4>PyCoverageDialog (Constructor)</h4> 139 <h4>PyCoverageDialog (Constructor)</h4>
112 <b>PyCoverageDialog</b>(<i>parent=None</i>) 140 <b>PyCoverageDialog</b>(<i>parent=None</i>)
141
113 <p> 142 <p>
114 Constructor 143 Constructor
115 </p><dl> 144 </p>
145 <dl>
146
116 <dt><i>parent</i></dt> 147 <dt><i>parent</i></dt>
117 <dd> 148 <dd>
118 parent widget (QWidget) 149 parent widget (QWidget)
119 </dd> 150 </dd>
120 </dl><a NAME="PyCoverageDialog.__annotate" ID="PyCoverageDialog.__annotate"></a> 151 </dl>
152 <a NAME="PyCoverageDialog.__annotate" ID="PyCoverageDialog.__annotate"></a>
121 <h4>PyCoverageDialog.__annotate</h4> 153 <h4>PyCoverageDialog.__annotate</h4>
122 <b>__annotate</b>(<i></i>) 154 <b>__annotate</b>(<i></i>)
155
123 <p> 156 <p>
124 Private slot to handle the annotate context menu action. 157 Private slot to handle the annotate context menu action.
125 </p><p> 158 </p>
159 <p>
126 This method produce an annotated coverage file of the 160 This method produce an annotated coverage file of the
127 selected file. 161 selected file.
128 </p><a NAME="PyCoverageDialog.__annotateAll" ID="PyCoverageDialog.__annotateAll"></a> 162 </p>
163 <a NAME="PyCoverageDialog.__annotateAll" ID="PyCoverageDialog.__annotateAll"></a>
129 <h4>PyCoverageDialog.__annotateAll</h4> 164 <h4>PyCoverageDialog.__annotateAll</h4>
130 <b>__annotateAll</b>(<i></i>) 165 <b>__annotateAll</b>(<i></i>)
166
131 <p> 167 <p>
132 Private slot to handle the annotate all context menu action. 168 Private slot to handle the annotate all context menu action.
133 </p><p> 169 </p>
170 <p>
134 This method produce an annotated coverage file of every 171 This method produce an annotated coverage file of every
135 file listed in the listview. 172 file listed in the listview.
136 </p><a NAME="PyCoverageDialog.__createResultItem" ID="PyCoverageDialog.__createResultItem"></a> 173 </p>
174 <a NAME="PyCoverageDialog.__createResultItem" ID="PyCoverageDialog.__createResultItem"></a>
137 <h4>PyCoverageDialog.__createResultItem</h4> 175 <h4>PyCoverageDialog.__createResultItem</h4>
138 <b>__createResultItem</b>(<i>file, statements, executed, coverage, excluded, missing</i>) 176 <b>__createResultItem</b>(<i>file, statements, executed, coverage, excluded, missing</i>)
177
139 <p> 178 <p>
140 Private method to create an entry in the result list. 179 Private method to create an entry in the result list.
141 </p><dl> 180 </p>
181 <dl>
182
142 <dt><i>file</i></dt> 183 <dt><i>file</i></dt>
143 <dd> 184 <dd>
144 filename of file (string) 185 filename of file (string)
145 </dd><dt><i>statements</i></dt> 186 </dd>
187 <dt><i>statements</i></dt>
146 <dd> 188 <dd>
147 amount of statements (integer) 189 amount of statements (integer)
148 </dd><dt><i>executed</i></dt> 190 </dd>
191 <dt><i>executed</i></dt>
149 <dd> 192 <dd>
150 amount of executed statements (integer) 193 amount of executed statements (integer)
151 </dd><dt><i>coverage</i></dt> 194 </dd>
195 <dt><i>coverage</i></dt>
152 <dd> 196 <dd>
153 percent of coverage (integer) 197 percent of coverage (integer)
154 </dd><dt><i>excluded</i></dt> 198 </dd>
199 <dt><i>excluded</i></dt>
155 <dd> 200 <dd>
156 list of excluded lines (string) 201 list of excluded lines (string)
157 </dd><dt><i>missing</i></dt> 202 </dd>
203 <dt><i>missing</i></dt>
158 <dd> 204 <dd>
159 list of lines without coverage (string) 205 list of lines without coverage (string)
160 </dd> 206 </dd>
161 </dl><a NAME="PyCoverageDialog.__deleteAnnotated" ID="PyCoverageDialog.__deleteAnnotated"></a> 207 </dl>
208 <a NAME="PyCoverageDialog.__deleteAnnotated" ID="PyCoverageDialog.__deleteAnnotated"></a>
162 <h4>PyCoverageDialog.__deleteAnnotated</h4> 209 <h4>PyCoverageDialog.__deleteAnnotated</h4>
163 <b>__deleteAnnotated</b>(<i></i>) 210 <b>__deleteAnnotated</b>(<i></i>)
211
164 <p> 212 <p>
165 Private slot to handle the delete annotated context menu action. 213 Private slot to handle the delete annotated context menu action.
166 </p><p> 214 </p>
215 <p>
167 This method deletes all annotated files. These are files 216 This method deletes all annotated files. These are files
168 ending with ',cover'. 217 ending with ',cover'.
169 </p><a NAME="PyCoverageDialog.__erase" ID="PyCoverageDialog.__erase"></a> 218 </p>
219 <a NAME="PyCoverageDialog.__erase" ID="PyCoverageDialog.__erase"></a>
170 <h4>PyCoverageDialog.__erase</h4> 220 <h4>PyCoverageDialog.__erase</h4>
171 <b>__erase</b>(<i></i>) 221 <b>__erase</b>(<i></i>)
222
172 <p> 223 <p>
173 Private slot to handle the erase context menu action. 224 Private slot to handle the erase context menu action.
174 </p><p> 225 </p>
226 <p>
175 This method erases the collected coverage data that is 227 This method erases the collected coverage data that is
176 stored in the .coverage file. 228 stored in the .coverage file.
177 </p><a NAME="PyCoverageDialog.__finish" ID="PyCoverageDialog.__finish"></a> 229 </p>
230 <a NAME="PyCoverageDialog.__finish" ID="PyCoverageDialog.__finish"></a>
178 <h4>PyCoverageDialog.__finish</h4> 231 <h4>PyCoverageDialog.__finish</h4>
179 <b>__finish</b>(<i></i>) 232 <b>__finish</b>(<i></i>)
233
180 <p> 234 <p>
181 Private slot called when the action finished or the user pressed the 235 Private slot called when the action finished or the user pressed the
182 button. 236 button.
183 </p><a NAME="PyCoverageDialog.__format_lines" ID="PyCoverageDialog.__format_lines"></a> 237 </p>
238 <a NAME="PyCoverageDialog.__format_lines" ID="PyCoverageDialog.__format_lines"></a>
184 <h4>PyCoverageDialog.__format_lines</h4> 239 <h4>PyCoverageDialog.__format_lines</h4>
185 <b>__format_lines</b>(<i>lines</i>) 240 <b>__format_lines</b>(<i>lines</i>)
241
186 <p> 242 <p>
187 Private method to format a list of integers into string by coalescing 243 Private method to format a list of integers into string by coalescing
188 groups. 244 groups.
189 </p><dl> 245 </p>
246 <dl>
247
190 <dt><i>lines</i></dt> 248 <dt><i>lines</i></dt>
191 <dd> 249 <dd>
192 list of integers 250 list of integers
193 </dd> 251 </dd>
194 </dl><dl> 252 </dl>
253 <dl>
195 <dt>Returns:</dt> 254 <dt>Returns:</dt>
196 <dd> 255 <dd>
197 string representing the list 256 string representing the list
198 </dd> 257 </dd>
199 </dl><a NAME="PyCoverageDialog.__openFile" ID="PyCoverageDialog.__openFile"></a> 258 </dl>
259 <a NAME="PyCoverageDialog.__openFile" ID="PyCoverageDialog.__openFile"></a>
200 <h4>PyCoverageDialog.__openFile</h4> 260 <h4>PyCoverageDialog.__openFile</h4>
201 <b>__openFile</b>(<i>itm=None</i>) 261 <b>__openFile</b>(<i>itm=None</i>)
262
202 <p> 263 <p>
203 Private slot to open the selected file. 264 Private slot to open the selected file.
204 </p><dl> 265 </p>
266 <dl>
267
205 <dt><i>itm</i></dt> 268 <dt><i>itm</i></dt>
206 <dd> 269 <dd>
207 reference to the item to be opened (QTreeWidgetItem) 270 reference to the item to be opened (QTreeWidgetItem)
208 </dd> 271 </dd>
209 </dl><a NAME="PyCoverageDialog.__showContextMenu" ID="PyCoverageDialog.__showContextMenu"></a> 272 </dl>
273 <a NAME="PyCoverageDialog.__showContextMenu" ID="PyCoverageDialog.__showContextMenu"></a>
210 <h4>PyCoverageDialog.__showContextMenu</h4> 274 <h4>PyCoverageDialog.__showContextMenu</h4>
211 <b>__showContextMenu</b>(<i>coord</i>) 275 <b>__showContextMenu</b>(<i>coord</i>)
276
212 <p> 277 <p>
213 Private slot to show the context menu of the listview. 278 Private slot to show the context menu of the listview.
214 </p><dl> 279 </p>
280 <dl>
281
215 <dt><i>coord</i></dt> 282 <dt><i>coord</i></dt>
216 <dd> 283 <dd>
217 the position of the mouse pointer (QPoint) 284 the position of the mouse pointer (QPoint)
218 </dd> 285 </dd>
219 </dl><a NAME="PyCoverageDialog.on_buttonBox_clicked" ID="PyCoverageDialog.on_buttonBox_clicked"></a> 286 </dl>
287 <a NAME="PyCoverageDialog.on_buttonBox_clicked" ID="PyCoverageDialog.on_buttonBox_clicked"></a>
220 <h4>PyCoverageDialog.on_buttonBox_clicked</h4> 288 <h4>PyCoverageDialog.on_buttonBox_clicked</h4>
221 <b>on_buttonBox_clicked</b>(<i>button</i>) 289 <b>on_buttonBox_clicked</b>(<i>button</i>)
290
222 <p> 291 <p>
223 Private slot called by a button of the button box clicked. 292 Private slot called by a button of the button box clicked.
224 </p><dl> 293 </p>
294 <dl>
295
225 <dt><i>button</i></dt> 296 <dt><i>button</i></dt>
226 <dd> 297 <dd>
227 button that was clicked (QAbstractButton) 298 button that was clicked (QAbstractButton)
228 </dd> 299 </dd>
229 </dl><a NAME="PyCoverageDialog.on_reloadButton_clicked" ID="PyCoverageDialog.on_reloadButton_clicked"></a> 300 </dl>
301 <a NAME="PyCoverageDialog.on_reloadButton_clicked" ID="PyCoverageDialog.on_reloadButton_clicked"></a>
230 <h4>PyCoverageDialog.on_reloadButton_clicked</h4> 302 <h4>PyCoverageDialog.on_reloadButton_clicked</h4>
231 <b>on_reloadButton_clicked</b>(<i></i>) 303 <b>on_reloadButton_clicked</b>(<i></i>)
304
232 <p> 305 <p>
233 Private slot to reload the coverage info. 306 Private slot to reload the coverage info.
234 </p><a NAME="PyCoverageDialog.on_resultList_itemActivated" ID="PyCoverageDialog.on_resultList_itemActivated"></a> 307 </p>
308 <a NAME="PyCoverageDialog.on_resultList_itemActivated" ID="PyCoverageDialog.on_resultList_itemActivated"></a>
235 <h4>PyCoverageDialog.on_resultList_itemActivated</h4> 309 <h4>PyCoverageDialog.on_resultList_itemActivated</h4>
236 <b>on_resultList_itemActivated</b>(<i>item, column</i>) 310 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
311
237 <p> 312 <p>
238 Private slot to handle the activation of an item. 313 Private slot to handle the activation of an item.
239 </p><dl> 314 </p>
315 <dl>
316
240 <dt><i>item</i></dt> 317 <dt><i>item</i></dt>
241 <dd> 318 <dd>
242 reference to the activated item (QTreeWidgetItem) 319 reference to the activated item (QTreeWidgetItem)
243 </dd><dt><i>column</i></dt> 320 </dd>
321 <dt><i>column</i></dt>
244 <dd> 322 <dd>
245 column the item was activated in (integer) 323 column the item was activated in (integer)
246 </dd> 324 </dd>
247 </dl><a NAME="PyCoverageDialog.start" ID="PyCoverageDialog.start"></a> 325 </dl>
326 <a NAME="PyCoverageDialog.start" ID="PyCoverageDialog.start"></a>
248 <h4>PyCoverageDialog.start</h4> 327 <h4>PyCoverageDialog.start</h4>
249 <b>start</b>(<i>cfn, fn</i>) 328 <b>start</b>(<i>cfn, fn</i>)
329
250 <p> 330 <p>
251 Public slot to start the coverage data evaluation. 331 Public slot to start the coverage data evaluation.
252 </p><dl> 332 </p>
333 <dl>
334
253 <dt><i>cfn</i></dt> 335 <dt><i>cfn</i></dt>
254 <dd> 336 <dd>
255 basename of the coverage file (string) 337 basename of the coverage file (string)
256 </dd><dt><i>fn</i></dt> 338 </dd>
339 <dt><i>fn</i></dt>
257 <dd> 340 <dd>
258 file or list of files or directory to be checked 341 file or list of files or directory to be checked
259 (string or list of strings) 342 (string or list of strings)
260 </dd> 343 </dd>
261 </dl><a NAME="PyCoverageDialog.stringify" ID="PyCoverageDialog.stringify"></a> 344 </dl>
345 <a NAME="PyCoverageDialog.stringify" ID="PyCoverageDialog.stringify"></a>
262 <h4>PyCoverageDialog.stringify</h4> 346 <h4>PyCoverageDialog.stringify</h4>
263 <b>stringify</b>(<i></i>) 347 <b>stringify</b>(<i></i>)
348
264 <p> 349 <p>
265 Private helper function to generate a string representation of a 350 Private helper function to generate a string representation of a
266 pair. 351 pair.
267 </p><dl> 352 </p>
353 <dl>
354
268 <dt><i>pair</i></dt> 355 <dt><i>pair</i></dt>
269 <dd> 356 <dd>
270 pair of integers 357 pair of integers
271 </dd> 358 </dd>
272 </dl> 359 </dl>

eric ide

mercurial