Merge pull request #18 from dstufft/use-tox

Use tox to handle the testing and enable coverage
This commit is contained in:
Alex Gaynor 2014-12-05 17:43:28 -08:00
commit 4c173b52ac
2 changed files with 31 additions and 15 deletions

View File

@ -1,19 +1,25 @@
language: python
python:
- "2.6"
- "2.7"
- "3.2"
- "3.3"
- "PyPy"
install:
- "pip install ."
script:
- py.test
env:
# We have to explicitly use the CC arguments here because Travis does not
# support the compiler directive with language: python.
- TOXENV=py26 CC=gcc
- TOXENV=py27 CC=gcc
- TOXENV=py32 CC=gcc
- TOXENV=py33 CC=gcc
- TOXENV=py34 CC=gcc
- TOXENV=pypy CC=gcc
- TOXENV=py26 CC=clang
- TOXENV=py27 CC=clang
- TOXENV=py32 CC=clang
- TOXENV=py33 CC=clang
- TOXENV=py34 CC=clang
- TOXENV=pypy CC=clang
install: pip install tox
script: tox
branches:
only:
- master
matrix:
allow_failures:
# Travis-CI currently has PyPy 1.9 which does not have the CFFI backend.
# See: https://github.com/travis-ci/travis-ci/issues/1106
- python: "PyPy"

10
tox.ini Normal file
View File

@ -0,0 +1,10 @@
[tox]
envlist = py26,py27,pypy,py32,py33,py34
[testenv]
# If you add a new dep here you probably need to add it in setup.py as well
deps =
mock
pytest
commands =
py.test --strict {posargs}