Commit 44059067 authored by Stefan Behnel's avatar Stefan Behnel

coverage: add "file_locator" attribute to enable XML reporting

parent 39dedc8a
...@@ -10,9 +10,10 @@ from collections import defaultdict ...@@ -10,9 +10,10 @@ from collections import defaultdict
try: try:
from coverage.plugin import CoveragePlugin, FileTracer, FileReporter from coverage.plugin import CoveragePlugin, FileTracer, FileReporter
from coverage.files import FileLocator
except ImportError: except ImportError:
# version too old? # version too old?
CoveragePlugin = FileTracer = FileReporter = object CoveragePlugin = FileTracer = FileReporter = FileLocator = object
from . import __version__ from . import __version__
...@@ -179,6 +180,8 @@ class CythonModuleReporter(FileReporter): ...@@ -179,6 +180,8 @@ class CythonModuleReporter(FileReporter):
""" """
Provide detailed trace information for one source file to coverage.py. Provide detailed trace information for one source file to coverage.py.
""" """
file_locator = FileLocator()
def __init__(self, c_file, source_file, rel_file_path, code, excluded): def __init__(self, c_file, source_file, rel_file_path, code, excluded):
super(CythonModuleReporter, self).__init__(source_file) super(CythonModuleReporter, self).__init__(source_file)
self.name = rel_file_path self.name = rel_file_path
......
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