MCPcopy Create free account
hub / github.com/mpi4py/mpi4py / CythonFileReporter

Class CythonFileReporter

conf/cycoverage.py:53–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52
53class CythonFileReporter(FileReporter):
54 def __init__(self, filename, exclude=None):
55 super().__init__(filename)
56 self.exclude = exclude
57
58 def lines(self):
59 _setup_lines(self.exclude)
60 return self._get_lines(CODE_LINES)
61
62 def excluded_lines(self):
63 _setup_lines(self.exclude)
64 return self._get_lines(EXCL_LINES)
65
66 def translate_lines(self, lines):
67 _setup_lines(self.exclude)
68 exec_lines = self._get_lines(EXEC_LINES)
69 return set(lines).union(exec_lines)
70
71 def _get_lines(self, lines_map):
72 key = os.path.relpath(self.filename, TOPDIR)
73 lines = lines_map.get(key, {})
74 return set(lines)
75
76
77TOPDIR = pathlib.Path(__file__).resolve().parent.parent

Callers 1

file_reporterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…