aboutsummaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorNathaniel Manista <nathaniel@google.com>2016-08-09 19:53:30 -0700
committerGitHub <noreply@github.com>2016-08-09 19:53:30 -0700
commitf774a6660d171c76f168ff5b289825efcf269125 (patch)
tree8e64764186e5aad1a4ca65f56b5cd8dd29be2a23 /tox.ini
parentf282a9260e858b4f7aecfc69336d18c42f988655 (diff)
parent4cac96d1a829e3e4e7b28c58c121db728a4d39c6 (diff)
downloadoauth2client-f774a6660d171c76f168ff5b289825efcf269125.tar.gz
Merge pull request #569 from pferate/pytest_runner
Migrate test runner to py.test.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini67
1 files changed, 19 insertions, 48 deletions
diff --git a/tox.ini b/tox.ini
index 31a638e..556c52a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,7 +7,7 @@ basedeps = mock>=1.3.0
cryptography>=1.0
pyopenssl>=0.14
webtest
- nose
+ pytest
flask
unittest2
sqlalchemy
@@ -18,60 +18,41 @@ deps = {[testenv]basedeps}
setenv =
pypy: with_gmp=no
DJANGO_SETTINGS_MODULE=tests.contrib.django_util.settings
-commands = nosetests --ignore-files=test_appengine\.py --ignore-files=test__appengine_ndb\.py {posargs}
+commands =
+ py.test {posargs}
[coverbase]
basepython = python2.7
commands =
- nosetests \
- --with-coverage \
- --cover-package=oauth2client \
- --cover-package=tests \
- --cover-erase \
- --cover-tests \
- --cover-branches \
- --ignore-files=test_appengine\.py \
- --ignore-files=test__appengine_ndb\.py
- nosetests \
- --with-coverage \
- --cover-package=oauth2client.contrib.appengine \
- --cover-package=oauth2client.contrib._appengine_ndb \
- --cover-package=tests.contrib.test_appengine \
- --cover-package=tests.contrib.test__appengine_ndb \
- --with-gae \
- --cover-tests \
- --cover-branches \
- --gae-application=tests/data \
- --gae-lib-root={env:GAE_PYTHONPATH:google_appengine} \
- --logging-level=INFO \
- tests/contrib/test_appengine.py \
- tests/contrib/test__appengine_ndb.py
+ py.test \
+ --cov=oauth2client \
+ --cov=tests
+ py.test \
+ --cov=oauth2client \
+ --cov=tests \
+ --cov-append \
+ --gae-sdk={env:GAE_PYTHONPATH} \
+ tests/contrib/appengine
deps = {[testenv]deps}
coverage
- nosegae
+ pytest-cov
[testenv:py33]
basepython =
python3.3
commands =
- nosetests \
- --ignore-files=test_appengine\.py \
- --ignore-files=test__appengine_ndb\.py \
- --ignore-files=test_django_orm\.py \
- --ignore-files=test_django_settings\.py \
- --ignore-files=test_django_util\.py \
- --exclude-dir=oauth2client/contrib/django_util \
- --exclude-dir=tests/contrib/django_util \
+ py.test \
+ --ignore=oauth2client/contrib/django_util \
+ --ignore=tests/contrib/django_util \
{posargs}
deps = {[testenv]basedeps}
keyring
- nose-exclude
[testenv:cover]
basepython = {[coverbase]basepython}
commands =
{[coverbase]commands}
- coverage report --show-missing --cover-min-percentage=100
+ coverage report --show-missing --fail-under=100
deps =
{[coverbase]deps}
@@ -100,15 +81,8 @@ commands = {toxinidir}/scripts/build_docs.sh
[testenv:gae]
basepython = python2.7
deps = {[testenv]basedeps}
- nosegae
commands =
- nosetests \
- --with-gae \
- --gae-lib-root={env:GAE_PYTHONPATH:google_appengine} \
- --gae-application=tests/data \
- --logging-level=INFO \
- tests/contrib/test_appengine.py \
- tests/contrib/test__appengine_ndb.py
+ py.test --gae-sdk={env:GAE_PYTHONPATH} tests/contrib/appengine
[testenv:system-tests]
basepython =
@@ -153,11 +127,8 @@ exclude = .tox,.git,./*.egg,build,
application-import-names = oauth2client
putty-ignore =
# E402 module level import not at top of file
- # These files have needed configurations defined before import
+ # This file has needed configurations defined before import
docs/conf.py : E402
- tests/contrib/test_appengine.py : E402
- # Additionally, ignore E100 (imports in wrong order) for Django configuration
- tests/contrib/test_django_orm.py : E402,I100
# E501 line too long
# Ignore lines over 80 chars that include "http:" or "https:"
/http:/ : E501