Commit dc3348d9 authored by Stefan Behnel's avatar Stefan Behnel

exclude coverage tests when running coverage analysis on Cython itself

parent 29eb0238
...@@ -1938,9 +1938,12 @@ def runtests(options, cmd_args, coverage=None): ...@@ -1938,9 +1938,12 @@ def runtests(options, cmd_args, coverage=None):
exclude_selectors.append(RegExSelector('Jedi')) exclude_selectors.append(RegExSelector('Jedi'))
try: try:
import coverage if coverage is not None:
if list(map(int, re.findall('[0-9]+', coverage.__version__ or '0'))) < [4, 0]: # cannot run coverage tests while collecting coverage data for Cython
raise ImportError 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): except (ImportError, AttributeError, TypeError):
exclude_selectors.append(RegExSelector('coverage')) exclude_selectors.append(RegExSelector('coverage'))
......
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