12 import types |
12 import types |
13 |
13 |
14 from PyQt4.QtCore import * |
14 from PyQt4.QtCore import * |
15 from PyQt4.QtGui import * |
15 from PyQt4.QtGui import * |
16 |
16 |
17 from Ui_PyCoverageDialog import Ui_PyCoverageDialog |
17 from .Ui_PyCoverageDialog import Ui_PyCoverageDialog |
18 |
18 |
19 import Utilities |
19 import Utilities |
20 from DebugClients.Python.coverage import coverage |
20 from DebugClients.Python3.coverage import coverage |
21 |
21 |
22 class PyCoverageDialog(QDialog, Ui_PyCoverageDialog): |
22 class PyCoverageDialog(QDialog, Ui_PyCoverageDialog): |
23 """ |
23 """ |
24 Class implementing a dialog to display the collected code coverage data. |
24 Class implementing a dialog to display the collected code coverage data. |
25 """ |
25 """ |
135 |
135 |
136 self.basename = os.path.splitext(cfn)[0] |
136 self.basename = os.path.splitext(cfn)[0] |
137 |
137 |
138 self.cfn = "%s.coverage" % self.basename |
138 self.cfn = "%s.coverage" % self.basename |
139 |
139 |
140 if type(fn) is types.ListType: |
140 if isinstance(fn, list): |
141 files = fn |
141 files = fn |
142 self.path = os.path.dirname(cfn) |
142 self.path = os.path.dirname(cfn) |
143 elif os.path.isdir(fn): |
143 elif os.path.isdir(fn): |
144 files = Utilities.direntries(fn, True, '*.py', False) |
144 files = Utilities.direntries(fn, True, '*.py', False) |
145 self.path = fn |
145 self.path = fn |