Fix run_tests to use pytest. (#1033)

Update tox.ini envlist.
main
Wolfgang Langner 6 years ago committed by Selwin Ong
parent 7893168c87
commit 972778d041

@ -26,7 +26,7 @@ fi
# For use on build server, we need exit code to be representative of success/failure # For use on build server, we need exit code to be representative of success/failure
if [ "$1" = '-x' ]; then if [ "$1" = '-x' ]; then
shift 1 shift 1
/usr/bin/env python -m unittest discover -v -s tests $@ 2>&1 /usr/bin/env python -m pytest -v tests $@ 2>&1
else else
/usr/bin/env python -m unittest discover -v -s tests $@ 2>&1 | egrep -v '^test_' | $safe_rg /usr/bin/env python -m pytest -v tests $@ 2>&1 | egrep -v '^test_' | $safe_rg
fi fi

@ -1,22 +1,15 @@
[tox] [tox]
envlist=py26,py27,py33,py34,py35,py36,py37,pypy,flake8 envlist=py27,py34,py35,py36,py37,pypy,flake8
[testenv] [testenv]
commands=py.test --cov rq --durations=5 {posargs} commands=pytest --cov rq --durations=5 {posargs}
deps= deps=
pytest pytest
pytest-cov pytest-cov
mock mock
[testenv:py26]
deps=
pytest
pytest-cov
unittest2
mock
[testenv:flake8] [testenv:flake8]
basepython = python2.7 basepython = python3.6
deps = deps =
flake8 flake8
commands = commands =

Loading…
Cancel
Save