Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 116 lines (102 sloc) 3.821 kb
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
1 # Tox (http://codespeak.net/~hpk/tox/) is a tool for running tests
2 # in multiple virtualenvs. This configuration file will run the tornado
3 # test suite on all supported python versions. To use it, "pip install tox"
4 # and then run "tox" from this directory.
5 #
6 # See also tornado/test/run_pyversion_tests.py, which is faster but
7 # less thorough.
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
8 #
9 # On my macports-based setup, the environment variable
10 # ARCHFLAGS='-arch x86_64' must be set when building pycurl, and a
11 # symlink from mysql_config to mysql_config5 must exist when building
12 # MySQL-python.
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
13 [tox]
14 # "-full" variants include optional dependencies, to ensure
15 # that things work both in a bare install and with all the extras.
d37ac92 @bdarnell Add pypy-full to default envlist too
bdarnell authored
16 envlist = py27-full, py27-curl, py25-full, py32, pypy, py25, py26, py26-full, py27, py32-utf8, py33, py27-opt, py32-opt, pypy-full
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
17 [testenv]
18 commands = python -m tornado.test.runtests {posargs:}
19
20 # python will import relative to the current working directory by default,
21 # so cd into the tox working directory to avoid picking up the working
22 # copy of the files (especially important for 2to3).
23 changedir = {toxworkdir}
24 # Note that PYTHONPATH must not be set when running tox (and setting it
25 # with the following doesn't seem to work, since tox/virtualenv appends to
26 # PYTHONPATH)
27 #environment = PYTHONPATH=
28
29 [testenv:py25]
970b43b @bdarnell Add configs for testing on Vagrant-managed VMs.
bdarnell authored
30 basepython = python2.5
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
31 deps = simplejson
32
33 [testenv:py25-full]
34 basepython = python2.5
35 deps =
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
36 MySQL-python
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
37 pycurl
38 simplejson
3474d5f @bdarnell Twisted is dropping python 2.5 support in their upcoming 12.2.0 release.
bdarnell authored
39 # twisted is dropping python 2.5 support in 12.2.0
40 twisted<=12.1.0
53452e8 @bdarnell Fight bitrot in tornado.platform.twisted.
bdarnell authored
41 # zope.interface (used by twisted) dropped python 2.5 support in 4.0
42 zope.interface<4.0
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
43
af940f4 @bdarnell Major update to tornado.platform.twisted.
bdarnell authored
44 # py26-full deliberately runs an older version of twisted to ensure
45 # we're still compatible with the oldest version we support.
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
46 [testenv:py26-full]
47 basepython = python2.6
48 deps =
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
49 MySQL-python
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
50 pycurl
52c83a4 @bdarnell Our tests don't work with the recently-released Twisted 11.1.0, so pin
bdarnell authored
51 twisted==11.0.0
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
52
53 [testenv:py27-full]
54 basepython = python2.7
55 deps =
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
56 MySQL-python
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
57 pycurl
d1429ff @bdarnell Update twisted test blacklist for Twisted 12.0.0
bdarnell authored
58 twisted>=12.0.0
f376841 @bdarnell Add a config file to run tornado tests under multiple python versions wi...
bdarnell authored
59
98f7797 @bdarnell Make it possible to run the test suite with --httpclient=CurlAsyncHTTPCl...
bdarnell authored
60 [testenv:py27-curl]
61 # Same as py27-full, but runs the tests with curl_httpclient by default.
62 # Note that httpclient_test is always run with both client implementations;
63 # this flag controls which client all the other tests use.
64 basepython = python2.7
65 deps =
66 MySQL-python
67 pycurl
d1429ff @bdarnell Update twisted test blacklist for Twisted 12.0.0
bdarnell authored
68 twisted>=11.1.0
98f7797 @bdarnell Make it possible to run the test suite with --httpclient=CurlAsyncHTTPCl...
bdarnell authored
69 commands = python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient {posargs:}
70
a310102 @bdarnell Add a pypy-full test configuration.
bdarnell authored
71 [testenv:pypy-full]
72 # This configuration works with pypy 1.9. pycurl installs ok but
73 # curl_httpclient doesn't work. Also note that travis-ci does not yet
74 # have support for building C extensions with pypy, so we don't try to
75 # run this configuration there.
76 basepython = pypy
77 deps =
78 MySQL-python
79 twisted>=12.1.0
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
80
983fb8b @bdarnell Open template files in binary mode (to be decoded as utf8 later)
bdarnell authored
81 # In python 3, opening files in text mode uses a system-dependent encoding by
82 # default. Run the tests with "C" (ascii) and "utf-8" locales to ensure
83 # we don't have hidden dependencies on this setting.
84 [testenv:py32]
85 basepython = python3.2
86 setenv = LANG=C
ec49816 @bdarnell Fix str/bytes problems in the auth module on python 3.
bdarnell authored
87 # -b turns on an extra warning when calling str(bytes), and -bb makes
88 # it an error.
89 commands = python -bb -m tornado.test.runtests {posargs:}
983fb8b @bdarnell Open template files in binary mode (to be decoded as utf8 later)
bdarnell authored
90
91 [testenv:py32-utf8]
92 basepython = python3.2
93 setenv = LANG=en_US.utf-8
94
677c987 @bdarnell Test that tornado.database is at least importable on all supported pytho...
bdarnell authored
95 # No py32-full yet: none of our dependencies currently work on python3.
e81f42b @bdarnell Add python 3.3 (alpha) to the tox config.
bdarnell authored
96
97 [testenv:py33]
98 # tox doesn't yet know "py33" by default
3df46ee @bdarnell Merge branch 'branch2.2'
bdarnell authored
99 basepython = python3.3
577e9a0 @bdarnell Run the tests in optimized mode too to ensure that things still work
bdarnell authored
100
101 # Python's optimized mode disables the assert statement, so run the
102 # tests in this mode to ensure we haven't fallen into the trap of relying
103 # on an assertion's side effects or using them for things that should be
104 # runtime errors.
105 [testenv:py27-opt]
106 basepython = python2.7
107 deps =
108 MySQL-python
109 pycurl
110 twisted>=12.0.0
111 commands = python -O -m tornado.test.runtests {posargs:}
112
113 [testenv:py32-opt]
114 basepython = python3.2
115 commands = python -O -m tornado.test.runtests {posargs:}
Something went wrong with that request. Please try again.