Use tox for tests

This commit is contained in:
jpic 2016-06-15 21:18:03 +02:00
parent 8b751ca249
commit 2f27d04c86
2 changed files with 29 additions and 5 deletions

View File

@ -1,9 +1,15 @@
sudo: false
language: python
python:
- "2.7"
- "3.5"
- "3.5"
env:
global:
- PIP_RETRIES=10
- PIP_TIMEOUT=30
matrix:
- TOXENV=py27
- TOXENV=py35
install:
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install unittest2; fi
- pip install asgiref twisted autobahn
script: if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then python -m unittest2; else python -m unittest; fi
- travis_retry pip install tox
script:
- tox

18
tox.ini Normal file
View File

@ -0,0 +1,18 @@
[tox]
envlist = py{27,35}
[testenv]
usedevelop = true
commands =
python -m unittest
deps =
asgiref
twisted
autobahn
[testenv:py27]
commands =
python -m unittest2
deps =
unittest2
{[testenv]deps}