blob: b0781a8a1b8189111272e890663a5fb41a11e514 [file] [log] [blame]
Ali Afshar02b5f3f2012-09-06 08:43:10 -07001[tox]
Kevin Cheng8f8bf752019-02-08 21:17:48 +00002envlist = py26,py27,py33,py34,py35,pypy,gae,cover
Ali Afshar02b5f3f2012-09-06 08:43:10 -07003
4[testenv]
Danny Hermesfe25c132016-01-05 13:25:07 -08005basedeps = mock>=1.3.0
Danny Hermes40531652015-08-13 16:12:26 -07006 pycrypto>=2.6
7 cryptography>=1.0
8 pyopenssl>=0.14
Craig Citro4823cc92014-12-17 18:23:22 -08009 webtest
Kevin Cheng8f8bf752019-02-08 21:17:48 +000010 nose
Jon Wayne Parrott5a0bbfd2015-07-23 15:43:45 -070011 flask
Kevin Cheng8f8bf752019-02-08 21:17:48 +000012 unittest2
Dominik MiedziƄski5048d832015-11-30 11:26:49 +010013 sqlalchemy
Jon Wayne Parrott66d47252016-07-12 16:06:01 -070014 fasteners
Craig Citro4823cc92014-12-17 18:23:22 -080015deps = {[testenv]basedeps}
Craig Citro70c6c2b2015-01-05 23:35:18 -080016 django
Danny Hermesfe25c132016-01-05 13:25:07 -080017 keyring
Danny Hermes9b076702015-08-13 13:15:06 -070018setenv =
Danny Hermes9b076702015-08-13 13:15:06 -070019 pypy: with_gmp=no
Bill Prin25165ad2016-07-26 12:04:48 -070020 DJANGO_SETTINGS_MODULE=tests.contrib.django_util.settings
Kevin Cheng8f8bf752019-02-08 21:17:48 +000021commands = nosetests --ignore-files=test_appengine\.py --ignore-files=test__appengine_ndb\.py {posargs}
Pat Feratedd1d8ff2014-07-15 11:11:43 -070022
Jon Wayne Parrotta4bd21a2015-08-25 09:47:45 -070023[coverbase]
Craig Citro4823cc92014-12-17 18:23:22 -080024basepython = python2.7
Craig Citro7dff2c12014-12-12 17:13:22 -080025commands =
Kevin Cheng8f8bf752019-02-08 21:17:48 +000026 nosetests \
27 --with-coverage \
28 --cover-package=oauth2client \
29 --cover-package=tests \
30 --cover-erase \
31 --cover-tests \
32 --cover-branches \
33 --ignore-files=test_appengine\.py \
34 --ignore-files=test__appengine_ndb\.py
35 nosetests \
36 --with-coverage \
37 --cover-package=oauth2client.contrib.appengine \
38 --cover-package=oauth2client.contrib._appengine_ndb \
39 --cover-package=tests.contrib.test_appengine \
40 --cover-package=tests.contrib.test__appengine_ndb \
41 --with-gae \
42 --cover-tests \
43 --cover-branches \
44 --gae-application=tests/data \
45 --gae-lib-root={env:GAE_PYTHONPATH:google_appengine} \
46 --logging-level=INFO \
47 tests/contrib/test_appengine.py \
48 tests/contrib/test__appengine_ndb.py
Craig Citro7dff2c12014-12-12 17:13:22 -080049deps = {[testenv]deps}
Craig Citro4823cc92014-12-17 18:23:22 -080050 coverage
Kevin Cheng8f8bf752019-02-08 21:17:48 +000051 nosegae
52
53[testenv:py26]
54basepython =
55 python2.6
56commands =
57 nosetests \
58 --ignore-files=test_appengine\.py \
59 --ignore-files=test__appengine_ndb\.py \
60 --ignore-files=test_keyring_storage\.py \
61 --exclude-dir=oauth2client/contrib/django_util \
62 --exclude-dir=tests/contrib/django_util \
63 {posargs}
64deps = {[testenv]basedeps}
65 nose-exclude
66
67[testenv:py33]
68basepython =
69 python3.3
70commands =
71 nosetests \
72 --ignore-files=test_appengine\.py \
73 --ignore-files=test__appengine_ndb\.py \
74 --ignore-files=test_django_orm\.py \
75 --ignore-files=test_django_settings\.py \
76 --ignore-files=test_django_util\.py \
77 --exclude-dir=oauth2client/contrib/django_util \
78 --exclude-dir=tests/contrib/django_util \
79 {posargs}
80deps = {[testenv]basedeps}
81 keyring
82 nose-exclude
Jon Wayne Parrotta4bd21a2015-08-25 09:47:45 -070083
84[testenv:cover]
85basepython = {[coverbase]basepython}
86commands =
87 {[coverbase]commands}
Kevin Cheng8f8bf752019-02-08 21:17:48 +000088 coverage report --show-missing --cover-min-percentage=100
Jon Wayne Parrotta4bd21a2015-08-25 09:47:45 -070089deps =
90 {[coverbase]deps}
Craig Citro7dff2c12014-12-12 17:13:22 -080091
Kevin Cheng8f8bf752019-02-08 21:17:48 +000092[testenv:coveralls]
93basepython = {[coverbase]basepython}
94commands =
95 {[coverbase]commands}
96 coverage report --show-missing
97 coveralls
98deps =
99 {[coverbase]deps}
100 coveralls
101passenv = {[testenv:system-tests]passenv}
102
Craig Citro962cf742015-01-05 11:36:15 -0800103[testenv:docs]
104basepython = python2.7
105deps =
106 {[testenv:cover]deps}
Craig Citro962cf742015-01-05 11:36:15 -0800107 python-gflags
108 pyyaml
Craig Citro07da0fe2015-03-02 23:44:53 -0800109 sphinx>=1.3b2
Craig Citro9e4fe2f2015-01-06 00:17:23 -0800110 sphinx-rtd-theme
Emanuele Pucciarellid2c15e62015-07-09 11:27:59 +0200111 webapp2
Danny Hermesf6407562016-02-17 14:18:59 -0800112commands = {toxinidir}/scripts/build_docs.sh
Craig Citro962cf742015-01-05 11:36:15 -0800113
Jon Wayne Parrotte0be0762015-08-17 11:33:58 -0700114[testenv:gae]
115basepython = python2.7
116deps = {[testenv]basedeps}
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000117 nosegae
Jon Wayne Parrotte0be0762015-08-17 11:33:58 -0700118commands =
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000119 nosetests \
120 --with-gae \
121 --gae-lib-root={env:GAE_PYTHONPATH:google_appengine} \
122 --gae-application=tests/data \
123 --logging-level=INFO \
124 tests/contrib/test_appengine.py \
125 tests/contrib/test__appengine_ndb.py
Jon Wayne Parrotte0be0762015-08-17 11:33:58 -0700126
Danny Hermes659869f2015-04-13 10:06:18 -0700127[testenv:system-tests]
128basepython =
129 python2.7
130commands =
131 {toxinidir}/scripts/run_system_tests.sh
132deps =
Danny Hermes40531652015-08-13 16:12:26 -0700133 pycrypto>=2.6
134 cryptography>=1.0
135 pyopenssl>=0.14
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000136passenv = GOOGLE_* OAUTH2CLIENT_* TRAVIS*
Danny Hermes659869f2015-04-13 10:06:18 -0700137
138[testenv:system-tests3]
139basepython =
140 python3.4
141commands =
142 {toxinidir}/scripts/run_system_tests.sh
143deps =
Danny Hermes40531652015-08-13 16:12:26 -0700144 pycrypto>=2.6
145 cryptography>=1.0
146 pyopenssl>=0.14
Danny Hermes5d826bc2015-05-13 11:31:23 -0700147passenv = {[testenv:system-tests]passenv}
Danny Hermes6ce13742016-02-18 20:41:33 -0800148
149[testenv:gce-system-tests]
150basepython =
151 python2.7
152commands =
153 python {toxinidir}/scripts/run_gce_system_tests.py
154deps =
155 pycrypto>=2.6
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000156 unittest2
Danny Hermes6ce13742016-02-18 20:41:33 -0800157passenv = {[testenv:system-tests]passenv}
Pat Ferate8eb3aa22016-07-08 13:30:17 -0700158
159[testenv:flake8]
Pat Ferate09e94202016-07-10 17:24:18 -0700160commands = flake8 --import-order-style google {posargs}
161deps =
162 flake8-putty
163 flake8-import-order
Pat Ferate8eb3aa22016-07-08 13:30:17 -0700164
165[flake8]
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000166exclude = .tox,.git,./*.egg,build,
167application-import-names = oauth2client
Pat Ferate8eb3aa22016-07-08 13:30:17 -0700168putty-ignore =
169 # E402 module level import not at top of file
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000170 # These files have needed configurations defined before import
Pat Ferate8eb3aa22016-07-08 13:30:17 -0700171 docs/conf.py : E402
Kevin Cheng8f8bf752019-02-08 21:17:48 +0000172 tests/contrib/test_appengine.py : E402
173 # Additionally, ignore E100 (imports in wrong order) for Django configuration
174 tests/contrib/test_django_orm.py : E402,I100
Pat Ferate8eb3aa22016-07-08 13:30:17 -0700175 # E501 line too long
176 # Ignore lines over 80 chars that include "http:" or "https:"
177 /http:/ : E501
178 /https:/ : E501