Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
083b8d94
Commit
083b8d94
authored
Jul 14, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt coverage plugin to new API in coverage.py 4.0a7, minor changes
parent
82aed5cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Cython/Coverage.py
Cython/Coverage.py
+7
-1
No files found.
Cython/Coverage.py
View file @
083b8d94
...
...
@@ -4,6 +4,8 @@ A Cython plugin for coverage.py
Requires the coverage package at least in version 4.0 (which added the plugin API).
"""
from
__future__
import
absolute_import
import
re
import
os.path
from
collections
import
defaultdict
...
...
@@ -235,7 +237,7 @@ class CythonModuleTracer(FileTracer):
pass
abs_path = os.path.abspath(source_file)
if self.py_file and source_file
.lower().endswith('
.
py
')
:
if self.py_file and source_file
[-3:].lower() == '
.
py
'
:
# always let coverage.py handle this case itself
self._file_path_map[source_file] = self.py_file
return self.py_file
...
...
@@ -286,3 +288,7 @@ class CythonModuleReporter(FileReporter):
else:
for line in self._iter_source_tokens():
yield [('
txt
', line)]
def coverage_init(reg, options):
reg.add_file_tracer(Plugin())
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment