Commit 6c317fa1 authored by Stefan Behnel's avatar Stefan Behnel

make import of Cython.Coverage module fail if coverage.py isn't compatible...

make import of Cython.Coverage module fail if coverage.py isn't compatible (better raise ImportError than false hope)
parent aeb26314
...@@ -8,12 +8,8 @@ import re ...@@ -8,12 +8,8 @@ import re
import os.path import os.path
from collections import defaultdict from collections import defaultdict
try: from coverage.plugin import CoveragePlugin, FileTracer, FileReporter # requires coverage.py 4.0+
from coverage.plugin import CoveragePlugin, FileTracer, FileReporter from coverage.files import FileLocator # requires coverage.py 4.0+
from coverage.files import FileLocator
except ImportError:
# version too old?
CoveragePlugin = FileTracer = FileReporter = FileLocator = object
from . import __version__ from . import __version__
......
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