aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml21
-rw-r--r--tox.ini16
3 files changed, 29 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 5d29a9f4..3977f226 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
*.py[co]
__pycache__/
_build/
+.tox/
diff --git a/.travis.yml b/.travis.yml
index 08fa5d04..fe46c7d3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,15 @@
language: python
-python:
- - 2.6
- - 2.7
- - 3.2
- - 3.3
+python: 2.7
+env:
+ - TOX_ENV=py26
+ - TOX_ENV=py27
+ - TOX_ENV=py32
+ - TOX_ENV=py33
+ - TOX_ENV=docs
+ - TOX_ENV=pep8
+
install:
- - pip install pytest flake8 sphinx
+ - pip install tox
+
script:
- - py.test
- - "flake8 . --ignore='E128'"
- - sphinx-build -W -bhtml docs/ docs/_build/html/
+ - tox -e $TOX_ENV
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..4a80fc8b
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,16 @@
+[tox]
+envlist = py26,py27,pypy,py32,py33,docs,pep8
+
+[testenv]
+deps = pytest
+commands = py.test
+
+[testenv:docs]
+deps = sphinx
+basepython = python2.7
+changedir = docs
+commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
+
+[testenv:pep8]
+deps = flake8
+commands = flake8 cryptography/ tests/ docs/