From: Marc Abramowitz Date: Mon, 25 Nov 2013 18:18:24 +0000 (-0800) Subject: README.unittests.rst: Add blurb about tox X-Git-Tag: rel_0_9_0~65^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dceadfca5173649bddb8b00e45709cd186bfab88;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git README.unittests.rst: Add blurb about tox --- diff --git a/README.unittests.rst b/README.unittests.rst index 7d052cfd7a..0bac0bcc59 100644 --- a/README.unittests.rst +++ b/README.unittests.rst @@ -214,3 +214,42 @@ DEVELOPING AND TESTING NEW DIALECTS See the new file README.dialects.rst for detail on dialects. + +TESTING WITH MULTIPLE PYTHON VERSIONS USING TOX +----------------------------------------------- + +If you want to test across multiple versions of Python, you may find `tox +`_ useful. To use it: + +1. Create a ``tox.ini`` file with the following: + +.. code-block:: ini + + # Tox (http://tox.testrun.org/) is a tool for running tests + # in multiple virtualenvs. This configuration file will run the + # test suite on all supported python versions. To use it, "pip install tox" + # and then run "tox" from this directory. + + [tox] + envlist = py26, py27, py33, py34, pypy + + [testenv] + deps = + mock + nose + commands = {envpython} ./sqla_nose.py + +2. Run:: + + pip install tox + +3. Run:: + + tox + +This will run the test suite on all the Python versions listed in the +``envlist`` in the ``tox.ini`` file. You can also manually specify the versions +to test against:: + + tox -e py26,py27,py33 +