Running tests on multiple platforms using pytest-xdist
------------------------------------------------------

For each Python interpreter you want to test with, you need at least
`pytest` and `py` installed.

For instance, if you want some tests to be run under Python2.6, then
you must make sure that when the used Python2.6 interpreter is
invoked, it can find py and py.test.

For usage with virtual environments that means:

1) Create a virtual environment::

    $ virtualenv --no-site-packages -p /path-to-python2.6 sandbox26

  Of course you can pick a different name for your environment. The
  path to the Python interpreter, however, must exist already.

2) Activate the environment::

    $ source sandbox26/bin/activate

3) Install additional packages::

    (sandbox26) $ pip install py
    (sandbox26) $ pip install pytest

Afterwards you can deactivate the environment or not. Just as you like.

To deploy this new environment for your tests::

  $ ./bin/py.test --tx popen//python=sandbox26/bin/python

To run tests in several environments like this::

  $ ./bin/py.test --dist=each --tx popen//python=sandbox26/bin/python \
                              --tx popen//python=sandbox27/bin/python

etc.

More configuration options can be seen on

http://pypi.python.org/pypi/pytest-xdist

