fix coverage for pytest runner
This commit is contained in:
parent
bbfa978861
commit
5a16dda50d
@ -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
|
||||
|
8
setup.py
8
setup.py
@ -113,7 +113,13 @@ CLASSIFIERS = [
|
||||
|
||||
extra_opts = {
|
||||
"packages": find_packages(exclude=["tests", "tests.*"]),
|
||||
"tests_require": ["pytest<5.0", "coverage==4.2", "blinker", "Pillow>=2.0.0"],
|
||||
"tests_require": [
|
||||
"pytest<5.0",
|
||||
"pytest-cov",
|
||||
"coverage",
|
||||
"blinker",
|
||||
"Pillow>=2.0.0",
|
||||
],
|
||||
}
|
||||
if sys.version_info[0] == 3:
|
||||
extra_opts["use_2to3"] = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user