Commit 4418a47b authored by Stefan Behnel's avatar Stefan Behnel

Py3 fixes in Coverage plugin

parent 15354f18
...@@ -205,7 +205,7 @@ class Plugin(CoveragePlugin): ...@@ -205,7 +205,7 @@ class Plugin(CoveragePlugin):
if self._c_files_map is None: if self._c_files_map is None:
self._c_files_map = {} self._c_files_map = {}
for filename, code in code_lines.iteritems(): for filename, code in code_lines.items():
abs_path = _find_dep_file_path(c_file, filename) abs_path = _find_dep_file_path(c_file, filename)
self._c_files_map[abs_path] = (c_file, filename, code) self._c_files_map[abs_path] = (c_file, filename, code)
...@@ -263,11 +263,11 @@ class CythonModuleReporter(FileReporter): ...@@ -263,11 +263,11 @@ class CythonModuleReporter(FileReporter):
self._code = code self._code = code
def statements(self): def statements(self):
return self._code.viewkeys() return list(self._code)
def _iter_source_tokens(self): def _iter_source_tokens(self):
current_line = 1 current_line = 1
for line_no, code_line in sorted(self._code.iteritems()): for line_no, code_line in sorted(self._code.items()):
while line_no > current_line: while line_no > current_line:
yield [] yield []
current_line += 1 current_line += 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment