File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -199,14 +199,14 @@ $PYTHON -c 'import sys; print(sys.version)'
199199
200200# Run the tests with coverage if requested and coverage is installed.
201201# Only cover CPython. Jython and PyPy report suspiciously low coverage.
202- COVERAGE_OR_PYTHON=" $PYTHON "
202+ # Also skip CPython 3.4. It's not supported by coverage 5+, which uses
203+ # a new and incompatible data format.
204+ PYTHON_VERSION=$( $PYTHON -c ' import sys; print(".".join(map(str, sys.version_info[:2])))' )
203205COVERAGE_ARGS=" "
204- if [ -n " $COVERAGE " -a $PYTHON_IMPL = " CPython" ]; then
205- COVERAGE_BIN=" $( dirname " $PYTHON " ) /coverage"
206- if $COVERAGE_BIN --version; then
206+ if [ -n " $COVERAGE " -a $PYTHON_IMPL = " CPython" -a $PYTHON_VERSION != " 3.4" ]; then
207+ if $PYTHON -m coverage --version; then
207208 echo " INFO: coverage is installed, running tests with coverage..."
208- COVERAGE_OR_PYTHON=" $COVERAGE_BIN "
209- COVERAGE_ARGS=" run --branch"
209+ COVERAGE_ARGS=" -m coverage run --branch"
210210 else
211211 echo " INFO: coverage is not installed, running tests without coverage..."
212212 fi
You can’t perform that action at this time.
0 commit comments