2011-07-17 23:52:56 +00:00
|
|
|
# Tox (http://codespeak.net/~hpk/tox/) 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.
|
|
|
|
#
|
|
|
|
# See also tornado/test/run_pyversion_tests.py, which is faster but
|
|
|
|
# less thorough.
|
2011-08-03 06:26:50 +00:00
|
|
|
#
|
|
|
|
# On my macports-based setup, the environment variable
|
2012-09-16 21:02:49 +00:00
|
|
|
# ARCHFLAGS='-arch x86_64' must be set when building pycurl.
|
2011-07-17 23:52:56 +00:00
|
|
|
[tox]
|
|
|
|
# "-full" variants include optional dependencies, to ensure
|
|
|
|
# that things work both in a bare install and with all the extras.
|
2012-10-07 21:21:42 +00:00
|
|
|
envlist = py27-full, py27-curl, py25-full, py32, pypy, py25, py26, py26-full, py27, py32-utf8, py33, py27-opt, py32-opt, pypy-full, py27-select, py27-monotonic, py33-monotonic, py27-twisted
|
2011-07-17 23:52:56 +00:00
|
|
|
[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 2to3).
|
|
|
|
changedir = {toxworkdir}
|
|
|
|
# Note that PYTHONPATH must not be set when running tox (and setting it
|
|
|
|
# with the following doesn't seem to work, since tox/virtualenv appends to
|
|
|
|
# PYTHONPATH)
|
|
|
|
#environment = PYTHONPATH=
|
|
|
|
|
|
|
|
[testenv:py25]
|
2011-10-07 08:06:01 +00:00
|
|
|
basepython = python2.5
|
2012-08-30 21:43:54 +00:00
|
|
|
deps =
|
|
|
|
simplejson
|
|
|
|
unittest2
|
2011-07-17 23:52:56 +00:00
|
|
|
|
|
|
|
[testenv:py25-full]
|
|
|
|
basepython = python2.5
|
|
|
|
deps =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2011-07-17 23:52:56 +00:00
|
|
|
pycurl
|
|
|
|
simplejson
|
2012-08-30 17:42:54 +00:00
|
|
|
# twisted is dropping python 2.5 support in 12.2.0
|
|
|
|
twisted<=12.1.0
|
2012-08-30 21:43:54 +00:00
|
|
|
unittest2
|
2012-05-19 21:22:03 +00:00
|
|
|
# zope.interface (used by twisted) dropped python 2.5 support in 4.0
|
|
|
|
zope.interface<4.0
|
2011-07-17 23:52:56 +00:00
|
|
|
|
2012-08-30 21:43:54 +00:00
|
|
|
[testenv:py26]
|
|
|
|
basepython = python2.6
|
|
|
|
deps = unittest2
|
|
|
|
|
2012-01-17 07:23:21 +00:00
|
|
|
# py26-full deliberately runs an older version of twisted to ensure
|
|
|
|
# we're still compatible with the oldest version we support.
|
2011-07-17 23:52:56 +00:00
|
|
|
[testenv:py26-full]
|
|
|
|
basepython = python2.6
|
|
|
|
deps =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2011-07-17 23:52:56 +00:00
|
|
|
pycurl
|
2011-12-01 06:59:09 +00:00
|
|
|
twisted==11.0.0
|
2012-08-30 21:43:54 +00:00
|
|
|
unittest2
|
2011-07-17 23:52:56 +00:00
|
|
|
|
|
|
|
[testenv:py27-full]
|
|
|
|
basepython = python2.7
|
|
|
|
deps =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2011-07-17 23:52:56 +00:00
|
|
|
pycurl
|
2012-02-20 09:12:27 +00:00
|
|
|
twisted>=12.0.0
|
2011-07-17 23:52:56 +00:00
|
|
|
|
2012-01-08 21:49:30 +00:00
|
|
|
[testenv:py27-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 =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2012-01-08 21:49:30 +00:00
|
|
|
pycurl
|
2012-02-20 09:12:27 +00:00
|
|
|
twisted>=11.1.0
|
2012-01-08 21:49:30 +00:00
|
|
|
commands = python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient {posargs:}
|
|
|
|
|
2012-10-01 05:57:32 +00:00
|
|
|
[testenv:py27-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 =
|
|
|
|
futures
|
|
|
|
pycurl
|
|
|
|
twisted>=12.0.0
|
2012-10-06 19:52:34 +00:00
|
|
|
commands = python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop {posargs:}
|
2012-10-01 05:57:32 +00:00
|
|
|
|
2012-10-07 21:21:42 +00:00
|
|
|
[testenv:py27-twisted]
|
|
|
|
basepython = python2.7
|
|
|
|
deps =
|
|
|
|
futures
|
|
|
|
pycurl
|
|
|
|
twisted>=12.2.0
|
|
|
|
commands = python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop {posargs:}
|
|
|
|
|
2012-10-01 06:57:49 +00:00
|
|
|
[testenv:py27-monotonic]
|
|
|
|
basepython = python2.7
|
|
|
|
# TODO: remove this url when the pypi page is updated.
|
|
|
|
deps =
|
|
|
|
http://pypi.python.org/packages/source/M/Monotime/Monotime-1.0.tar.gz
|
|
|
|
futures
|
|
|
|
pycurl
|
|
|
|
twisted
|
|
|
|
commands = python -m tornado.test.runtests --ioloop_time_monotonic {posargs:}
|
|
|
|
|
2012-06-18 07:30:11 +00:00
|
|
|
[testenv:pypy-full]
|
|
|
|
# This configuration works with pypy 1.9. pycurl installs ok but
|
2012-09-29 23:35:57 +00:00
|
|
|
# curl_httpclient 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.
|
2012-06-18 07:30:11 +00:00
|
|
|
basepython = pypy
|
|
|
|
deps =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2011-08-03 06:26:50 +00:00
|
|
|
|
2012-04-19 00:45:09 +00:00
|
|
|
# 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
|
2012-08-12 00:51:27 +00:00
|
|
|
# -b turns on an extra warning when calling str(bytes), and -bb makes
|
|
|
|
# it an error.
|
|
|
|
commands = python -bb -m tornado.test.runtests {posargs:}
|
2012-04-19 00:45:09 +00:00
|
|
|
|
|
|
|
[testenv:py32-utf8]
|
|
|
|
basepython = python3.2
|
|
|
|
setenv = LANG=en_US.utf-8
|
|
|
|
|
2011-08-03 06:26:50 +00:00
|
|
|
# No py32-full yet: none of our dependencies currently work on python3.
|
2012-03-24 23:05:11 +00:00
|
|
|
|
|
|
|
[testenv:py33]
|
|
|
|
# tox doesn't yet know "py33" by default
|
2012-04-24 05:34:42 +00:00
|
|
|
basepython = python3.3
|
2012-06-13 17:55:46 +00:00
|
|
|
|
2012-10-01 06:57:49 +00:00
|
|
|
[testenv:py33-monotonic]
|
|
|
|
basepython = python3.3
|
|
|
|
commands = python -m tornado.test.runtests --ioloop_time_monotonic {posargs:}
|
|
|
|
|
2012-06-13 17:55:46 +00:00
|
|
|
# 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:py27-opt]
|
|
|
|
basepython = python2.7
|
|
|
|
deps =
|
2012-08-31 01:55:34 +00:00
|
|
|
futures
|
2012-06-13 17:55:46 +00:00
|
|
|
pycurl
|
|
|
|
twisted>=12.0.0
|
|
|
|
commands = python -O -m tornado.test.runtests {posargs:}
|
|
|
|
|
|
|
|
[testenv:py32-opt]
|
|
|
|
basepython = python3.2
|
|
|
|
commands = python -O -m tornado.test.runtests {posargs:}
|