Commit b42255e4 authored by Stefan Behnel's avatar Stefan Behnel

simplify coverage test exclusion by depending on successful plugin import

parent 6c317fa1
...@@ -102,7 +102,7 @@ EXT_DEP_MODULES = { ...@@ -102,7 +102,7 @@ EXT_DEP_MODULES = {
'tag:pstats': 'pstats', 'tag:pstats': 'pstats',
'tag:posix' : 'posix', 'tag:posix' : 'posix',
'tag:array' : 'array', 'tag:array' : 'array',
'tag:coverage': 'coverage', 'tag:coverage': 'Cython.Coverage',
'tag:ipython': 'IPython', 'tag:ipython': 'IPython',
'tag:jedi': 'jedi', 'tag:jedi': 'jedi',
} }
...@@ -1937,16 +1937,6 @@ def runtests(options, cmd_args, coverage=None): ...@@ -1937,16 +1937,6 @@ def runtests(options, cmd_args, coverage=None):
except (ImportError, AttributeError, TypeError): except (ImportError, AttributeError, TypeError):
exclude_selectors.append(RegExSelector('Jedi')) exclude_selectors.append(RegExSelector('Jedi'))
try:
if coverage is not None:
# cannot run coverage tests while collecting coverage data for Cython
raise ImportError("excluding coverage tests")
import coverage as coverage_module
if list(map(int, re.findall('[0-9]+', coverage_module.__version__ or '0'))) < [4, 0]:
raise ImportError("excluding coverage tests: version too old")
except (ImportError, AttributeError, TypeError):
exclude_selectors.append(RegExSelector('coverage'))
if options.exclude: if options.exclude:
exclude_selectors += [ string_selector(r) for r in options.exclude ] exclude_selectors += [ string_selector(r) for r in options.exclude ]
......
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