summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2015-11-27 09:56:27 +0100
committerVictor Stinner <vstinner@redhat.com>2016-02-15 10:32:59 +0100
commit58971d84da8006c945d44969684eead93a91f09e (patch)
treedbd5af86c062b6a122d3598e2aca21730a866c22
parent214d020970ad0b4012f3de5136f633c70a7a0220 (diff)
downloadroutes-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--.gitignore1
-rw-r--r--.travis.yml6
-rw-r--r--tox.ini17
3 files changed, 20 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 17db388..3f925d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..2c2419f
--- /dev/null
+++ b/tox.ini
@@ -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}