File tree 1 file changed +6
-6
lines changed
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)'
199
199
200
200
# Run the tests with coverage if requested and coverage is installed.
201
201
# 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])))' )
203
205
COVERAGE_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
207
208
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"
210
210
else
211
211
echo " INFO: coverage is not installed, running tests without coverage..."
212
212
fi
You can’t perform that action at this time.
0 commit comments