diff --git a/.travis.yml b/.travis.yml index 6f34248..3327d92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e9c9bc8 --- /dev/null +++ b/tox.ini @@ -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}