Commit 2657e9b3 authored by Stefan Behnel's avatar Stefan Behnel

include more Cython modules in coverage analysis

parent de5d9be9
...@@ -1927,12 +1927,14 @@ def runtests(options, cmd_args, coverage=None): ...@@ -1927,12 +1927,14 @@ def runtests(options, cmd_args, coverage=None):
if coverage is not None: if coverage is not None:
coverage.stop() coverage.stop()
ignored_modules = ('Options', 'Version', 'DebugFlags', 'CmdLine') ignored_modules = set(
modules = [ module for name, module in sys.modules.items() 'Cython.Compiler.' + name
for name in ('Options', 'Version', 'DebugFlags', 'CmdLine'))
modules = [module for name, module in sys.modules.items()
if module is not None and if module is not None and
name.startswith('Cython.Compiler.') and
'.Tests' not in name and '.Tests' not in name and
name[len('Cython.Compiler.'):] not in ignored_modules ] name.startswith('Cython.') and
name not in ignored_modules]
if options.coverage: if options.coverage:
coverage.report(modules, show_missing=0) coverage.report(modules, show_missing=0)
if options.coverage_xml: if options.coverage_xml:
......
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