forked from tornadoweb/tornado
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
242 lines (207 loc) · 7.7 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# Tox (http://tox.readthedocs.org) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the tornado
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
#
# Installation tips:
# When building pycurl on my macports-based setup, I need to either set the
# environment variable ARCHFLAGS='-arch x86_64' or use
# 'port install curl +universal' to get both 32- and 64-bit versions of
# libcurl.
[tox]
envlist =
# Basic configurations: Run the tests in both minimal installations
# and with all optional dependencies.
py26, py26-full,
py27, py27-full,
py32, py32-full,
py33, py33-full,
py34, py34-full,
pypy, pypy-full,
# Also run the tests with each possible replacement of a default
# component. Run each test on both python 2 and 3 where possible.
# (Only one 2.x and one 3.x unless there are known differences).
# Alternate HTTP clients.
py2-curl, py3-curl,
# Alternate IOLoops.
py2-select, py3-select,
py2-twisted, py26-twisted, py2-twistedlayered,
py3-asyncio, py33-asyncio, py26-trollius, py2-trollius,
# Other configurations; see comments below.
py2-monotonic, py3-monotonic,
py2-opt, py3-opt,
py3-utf8,
py2-locale,
# Ensure the sphinx build has no errors or warnings
py2-docs
[testenv]
commands = python -m tornado.test.runtests {posargs:}
# python will import relative to the current working directory by default,
# so cd into the tox working directory to avoid picking up the working
# copy of the files (especially important for the speedups module).
changedir = {toxworkdir}
# tox 1.6 passes --pre to pip by default, which currently has problems
# installing pycurl and monotime (https://github.com/pypa/pip/issues/1405).
# Remove it (it's not a part of {opts}) to only install real releases.
install_command = pip install {opts} {packages}
[testenv:py26]
basepython = python2.6
deps = unittest2
[testenv:py26-full]
basepython = python2.6
setenv = TORNADO_EXTENSION=1
deps =
{[testenv:py26]deps}
futures
mock
pycares
pycurl
twisted>=11.0.0
[testenv:py27-full]
basepython = python2.7
setenv = TORNADO_EXTENSION=1
deps =
futures
mock
pycares
pycurl
twisted>=11.0.0
# In python 3, opening files in text mode uses a system-dependent encoding by
# default. Run the tests with "C" (ascii) and "utf-8" locales to ensure
# we don't have hidden dependencies on this setting.
[testenv:py32]
basepython = python3.2
setenv = LANG=C
# -b turns on an extra warning when calling str(bytes), and -bb makes
# it an error.
commands = python -bb -m tornado.test.runtests {posargs:}
[testenv:py32-full]
basepython = python3.2
setenv = TORNADO_EXTENSION=1
deps =
mock
pycares
pycurl>=7.19.3
[testenv:py33-full]
basepython = python3.3
setenv = TORNADO_EXTENSION=1
# pycares installation currently fails on py33
# (https://github.com/pypa/pip/pull/816)
deps =
pycurl>=7.19.3
[testenv:py34-full]
basepython = python3.4
setenv = TORNADO_EXTENSION=1
# pycares installation currently fails on py34
# (https://github.com/pypa/pip/pull/816)
deps =
pycurl>=7.19.3
[testenv:pypy-full]
# This configuration works with pypy 1.9. pycurl installs ok but
# curl_httpclient doesn't work. pycares also installs but doesn't
# work. Twisted works most of the time, but its tests seem flaky
# under pypy, so we don't run it for now. Also note that travis-ci
# does not yet have support for building C extensions with pypy, so we
# don't try to run this configuration there.
basepython = pypy
deps =
futures
mock
[testenv:py2-curl]
# Same as py27-full, but runs the tests with curl_httpclient by default.
# Note that httpclient_test is always run with both client implementations;
# this flag controls which client all the other tests use.
basepython = python2.7
deps = {[testenv:py27-full]deps}
commands = python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient {posargs:}
[testenv:py3-curl]
basepython = python3.3
deps = {[testenv:py33-full]deps}
commands = python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient {posargs:}
[testenv:py2-select]
# Same as py27-full, but runs the tests with the select IOLoop.
# The other tests will run with the most platform-appropriate implementation,
# but this one is the lowest common denominator and should work anywhere.
basepython = python2.7
deps = {[testenv:py27-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop {posargs:}
[testenv:py3-select]
basepython = python3.3
deps = {[testenv:py33-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop {posargs:}
[testenv:py2-twisted]
basepython = python2.7
deps = {[testenv:py27-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop {posargs:}
[testenv:py26-twisted]
basepython = python2.6
deps = {[testenv:py26-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop {posargs:}
[testenv:py2-twistedlayered]
basepython = python2.7
deps = {[testenv:py27-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver {posargs:}
[testenv:py3-asyncio]
basepython = python3.4
deps = {[testenv:py34-full]deps}
commands = python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop {posargs:}
[testenv:py33-asyncio]
basepython = python3.3
deps =
{[testenv:py33-full]deps}
asyncio
commands = python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop {posargs:}
# Trollius is the py2 backport of asyncio.
[testenv:py2-trollius]
basepython = python2.7
deps =
{[testenv:py27-full]deps}
trollius>=0.1.1
commands = python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop {posargs:}
[testenv:py26-trollius]
basepython = python2.6
deps =
{[testenv:py26-full]deps}
trollius>=0.1.3
commands = python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop {posargs:}
[testenv:py2-monotonic]
basepython = python2.7
deps =
{[testenv:py27-full]deps}
Monotime
commands = python -m tornado.test.runtests --ioloop_time_monotonic {posargs:}
# Note that this test only works in py33+ (the Monotime backport package is
# only for 2.x)
[testenv:py3-monotonic]
basepython = python3.3
deps = {[testenv:py33-full]deps}
commands = python -m tornado.test.runtests --ioloop_time_monotonic {posargs:}
# Python's optimized mode disables the assert statement, so run the
# tests in this mode to ensure we haven't fallen into the trap of relying
# on an assertion's side effects or using them for things that should be
# runtime errors.
[testenv:py2-opt]
basepython = python2.7
deps = {[testenv:py27-full]deps}
commands = python -O -m tornado.test.runtests {posargs:}
[testenv:py3-opt]
basepython = python3.3
deps = {[testenv:py33-full]deps}
commands = python -O -m tornado.test.runtests {posargs:}
# Test with a non-english locale to uncover str/bytes mixing issues.
[testenv:py2-locale]
basepython = python2.7
commands = python -m tornado.test.runtests --locale=zh_TW {posargs:}
[testenv:py3-locale]
basepython = python3.3
commands = python -m tornado.test.runtests --locale=zh_TW {posargs:}
# This test is the counterpart to the LANG=C in testenv:py33.
[testenv:py3-utf8]
basepython = python3.3
setenv = LANG=en_US.utf-8
[testenv:py2-docs]
basepython = python2.7
changedir = docs
deps = sphinx==1.2
commands =
sphinx-build -q -E -n -W -b html . {envtmpdir}/html