# eric7.DataViews.PyCoverageDialog

Module implementing a Python code coverage dialog.

### Global Attributes

None

### Classes

PyCoverageDialog | Class implementing a dialog to display the collected code coverage data.

### Functions

None

## PyCoverageDialog

Class implementing a dialog to display the collected code coverage data.

### Derived from

QDialog, Ui_PyCoverageDialog

### Class Attributes

None

### Class Methods

None

### Methods

PyCoverageDialog | Constructor
__annotate | Private slot to handle the annotate context menu action.
__annotateAll | Private slot to handle the annotate all context menu action.
__createResultItem | Private method to create an entry in the result list.
__deleteAnnotated | Private slot to handle the delete annotated context menu action.
__erase | Private slot to handle the erase context menu action.
__finish | Private slot called when the action finished or the user pressed the button.
__format_lines | Private method to format a list of integers into string by coalescing groups.
__openFile | Private slot to open the selected file.
__showContextMenu | Private slot to show the context menu of the listview.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_reloadButton_clicked | Private slot to reload the coverage info.
on_resultList_itemActivated | Private slot to handle the activation of an item.
start | Public slot to start the coverage data evaluation.
stringify | Private helper function to generate a string representation of a pair.

### Static Methods

None

#### PyCoverageDialog (Constructor)

PyCoverageDialog(parent=None)

Constructor

parent
  parent widget (QWidget)

#### PyCoverageDialog.__annotate

__annotate()

Private slot to handle the annotate context menu action.

This method produce an annotated coverage file of the selected file.

#### PyCoverageDialog.__annotateAll

__annotateAll()

Private slot to handle the annotate all context menu action.

This method produce an annotated coverage file of every file listed in the listview.

#### PyCoverageDialog.__createResultItem

__createResultItem(file, statements, executed, coverage, excluded, missing)

Private method to create an entry in the result list.

file
  filename of file (string)
statements
  amount of statements (integer)
executed
  amount of executed statements (integer)
coverage
  percent of coverage (integer)
excluded
  list of excluded lines (string)
missing
  list of lines without coverage (string)

#### PyCoverageDialog.__deleteAnnotated

__deleteAnnotated()

Private slot to handle the delete annotated context menu action.

This method deletes all annotated files. These are files ending with ',cover'.

#### PyCoverageDialog.__erase

__erase()

Private slot to handle the erase context menu action.

This method erases the collected coverage data that is stored in the .coverage file.

#### PyCoverageDialog.__finish

__finish()

Private slot called when the action finished or the user pressed the button.

#### PyCoverageDialog.__format_lines

__format_lines(lines)

Private method to format a list of integers into string by coalescing groups.

lines
  list of integers

Return:
  string representing the list

#### PyCoverageDialog.__openFile

__openFile(itm=None)

Private slot to open the selected file.

itm
  reference to the item to be opened (QTreeWidgetItem)

#### PyCoverageDialog.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu of the listview.

coord
  the position of the mouse pointer (QPoint)

#### PyCoverageDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### PyCoverageDialog.on_reloadButton_clicked

on_reloadButton_clicked()

Private slot to reload the coverage info.

#### PyCoverageDialog.on_resultList_itemActivated

on_resultList_itemActivated(item, column)

Private slot to handle the activation of an item.

item
  reference to the activated item (QTreeWidgetItem)
column
  column the item was activated in (integer)

#### PyCoverageDialog.start

start(cfn, fn)

Public slot to start the coverage data evaluation.

cfn
  basename of the coverage file (string)
fn
  file or list of files or directory to be checked (string or list of strings)

#### PyCoverageDialog.stringify

stringify()

Private helper function to generate a string representation of a pair.

pair
  pair of integers

Up