diff options
author | Victor Stinner <vstinner@redhat.com> | 2015-11-27 09:56:27 +0100 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2016-02-15 10:32:59 +0100 |
commit | 58971d84da8006c945d44969684eead93a91f09e (patch) | |
tree | dbd5af86c062b6a122d3598e2aca21730a866c22 | |
parent | 214d020970ad0b4012f3de5136f633c70a7a0220 (diff) | |
download | routes-58971d84da8006c945d44969684eead93a91f09e.tar.gz |
Add tox.ini
tox is a nice tool to run tests: it creates virtual environments,
install test dependencies and run tests. With the simple command
"tox", tests are run on Python 2 and Python 3.
* Create tox.ini based on .travis.yml
* Modidy .travis.yml to use tox-travis:
https://github.com/ryanhiebert/tox-travis
* .gitignore: ignore .tox/ sub-directory created by tox.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | tox.ini | 17 |
3 files changed, 20 insertions, 4 deletions
@@ -12,3 +12,4 @@ html_coverage .hgignore .idea *.iml +.tox/ diff --git a/.travis.yml b/.travis.yml index 2f9b500..65a02f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,5 @@ python: matrix: allow_failures: - python: "nightly" -install: - - python setup.py develop - - pip install webob webtest coverage -script: python -bb $(which nosetests) +install: pip install tox-travis +script: tox @@ -0,0 +1,17 @@ +[tox] +envlist = py26,py27,py33,py34,pypy,pypy3 + +[testenv] +deps= + coverage + nose + webob + webtest +commands= + python -bb -m nose tests {posargs} + +[testenv:py26] +# Ony Python 2.6, python -m test doesn't work. Anyway, python -bb is only +# interested on Python 3. +commands= + nosetests tests {posargs} |