fix coverage for pytest runner

This commit is contained in:
Bastien Gérard
2019-08-26 17:12:56 +03:00
parent bbfa978861
commit 5a16dda50d
2 changed files with 9 additions and 3 deletions

View File

@@ -76,13 +76,13 @@ before_script:
- mongo --eval 'db.version();' # Make sure mongo is awake
script:
- tox -e $(echo py$TRAVIS_PYTHON_VERSION-mg$PYMONGO | tr -d . | sed -e 's/pypypy/pypy/') #-- --with-coverage
- tox -e $(echo py$TRAVIS_PYTHON_VERSION-mg$PYMONGO | tr -d . | sed -e 's/pypypy/pypy/') -- -a "--cov=mongoengine"
# For now only submit coveralls for Python v2.7. Python v3.x currently shows
# 0% coverage. That's caused by 'use_2to3', which builds the py3-compatible
# code in a separate dir and runs tests on that.
after_success:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then coveralls --verbose; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then cat .coverage & coveralls --verbose; fi
notifications:
irc: irc.freenode.org#mongoengine