]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add a config file to run tornado tests under multiple python versions with tox.
authorBen Darnell <ben@bendarnell.com>
Sun, 17 Jul 2011 23:52:56 +0000 (16:52 -0700)
committerBen Darnell <ben@bendarnell.com>
Sun, 17 Jul 2011 23:52:56 +0000 (16:52 -0700)
Also fix a setup.py problem that was leaving files out of the sdist output.

.gitignore
MANIFEST.in
tox.ini [new file with mode: 0644]

index 2ed2af569dd8c4c9f9382eff75575f6b4f0550aa..bccf00e54c654d38ff1dee2f20b696d81e1684fd 100644 (file)
@@ -6,3 +6,4 @@ dist/
 MANIFEST
 tornado.egg-info
 _auto2to3*
+.tox
\ No newline at end of file
index 9128f9e9fee8cc7349fecbb9409157e5946e8bb2..acbd940d39e4910fcc45f646349cfa916d88854f 100644 (file)
@@ -1,2 +1,7 @@
 recursive-include demos *.py *.yaml *.html *.css *.js *.xml *.sql README
 include tornado/epoll.c
+include tornado/ca-certificates.crt
+include tornado/test/README
+include tornado/test/test.crt
+include tornado/test/test.key
+global-exclude _auto2to3*
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..4816171
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,50 @@
+# 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.
+[tox]
+# "-full" variants include optional dependencies, to ensure
+# that things work both in a bare install and with all the extras.
+envlist = py25, py25-full, py26, py26-full, py27, py27-full, pypy, py32
+[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]
+deps = simplejson
+
+[testenv:py25-full]
+basepython = python2.5
+# pycurl doesn't install cleanly for me from pip on 2.5, so get it from
+# the system python.
+sitepackages = True
+deps =
+     pycurl
+     simplejson
+     twisted
+
+[testenv:py26-full]
+basepython = python2.6
+deps =
+     pycurl
+     twisted
+
+[testenv:py27-full]
+basepython = python2.7
+deps =
+     pycurl
+     twisted
+
+# No pypy-full yet:  pycurl doesn't build, and installing twisted
+# under pypy takes a *very* long time.  Neither package works on python3.