gittip/www.gittip.com — pull request #1490 by hashar (2013-09-22 04:05:37+00:00)
Title: test environnements using tox

tox is a pretty nice utility to create isolated test environnements. It
will invoke virtualenv, setup the dependencies and run whatever you want
in there with an easy syntax.

The test suite require environnement variables defined in the
default_tests.env file. To load it up, I am wrapping nose tests in a
bash shell and invoke /usr/bin/env to load the file containing
environnement variables. A bit hacky but working.

By default, tox is instructed to run two environements:
- py27 which run the nosetest command with python 2.7
- flake8 a source code checker wrapping both pep8 and pyflakes

You can list the environnement with `tox -l`, and select one of them
using `tox -e`. Options following a double dash '--', will fit in

Examples:

Simply run flake8 only:
tox -eflake8

Nosetests without capturing output:
tox -epy27 -- --nocapture