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
6405fede
Commit
6405fede
authored
Feb 20, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend test
parent
d025fdfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
tests/run/coverage_cmd.srctree
tests/run/coverage_cmd.srctree
+22
-0
No files found.
tests/run/coverage_cmd.srctree
View file @
6405fede
...
...
@@ -106,6 +106,7 @@ if __name__ == '__main__':
######## collect_coverage.py ########
import re
import sys
import os
import os.path
...
...
@@ -126,6 +127,27 @@ def run_report():
assert any(module_path in line for line in lines), "'%s' not found in coverage report:\n\n%s" % (
module_path, stdout)
files = {}
line_iter = iter(lines)
for line in line_iter:
if line.startswith('---'):
break
extend = [''] * 2
for line in line_iter:
if not line or line.startswith('---'):
continue
name, statements, missed, covered, _missing = (line.split(None, 4) + extend)[:5]
missing = []
for start, end in re.findall('([0-9]+)(?:-([0-9]+))?', _missing):
if end:
missing.extend(range(int(start), int(end)+1))
else:
missing.append(int(start))
files[os.path.basename(name)] = (statements, missed, covered, missing)
assert 7 not in files['coverage_test_pyx.pyx'][-1], files['coverage_test_pyx.pyx']
assert 12 not in files['coverage_test_pyx.pyx'][-1], files['coverage_test_pyx.pyx']
if __name__ == '__main__':
run_report()
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