Use tox in Travis
diff --git a/.gitignore b/.gitignore
index de0c776..2e98181 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
__pycache__
.tox
doc/_build/
+.coverage
diff --git a/.travis.yml b/.travis.yml
index eccc720..112a82c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -77,8 +77,7 @@
pip install virtualenv
fi
python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install coveralls coverage wheel
+ ~/.venv/bin/pip install coveralls tox
script:
- |
@@ -88,18 +87,10 @@
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CFLAGS="-I/usr/local/opt/openssl/include"
fi
- source ~/.venv/bin/activate
- pip install -e .
- - |
- source ~/.venv/bin/activate
- coverage run --branch --source=OpenSSL setup.py bdist_wheel test
- - |
- source ~/.venv/bin/activate
- coverage report -m
- python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"
+ ~/.venv/bin/tox
after_script:
- - source ~/.venv/bin/activate && coveralls
+ - ~/.venv/bin/coveralls
notifications:
email: false
diff --git a/tox.ini b/tox.ini
index 67386d1..cdd4295 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,10 +1,16 @@
[tox]
-envlist = pypy,py26,py27,py32,py33
+envlist = pypy,py26,py27,py32,py33,py34
[testenv]
+deps =
+ setuptools>=7.0
+ coverage
setenv =
# Do not allowed the executing environment to pollute the test environment
# with extra packages.
PYTHONPATH=
# The standard library unittest module can run tests on Python 2.7 and newer
-commands = python setup.py test
+commands =
+ python -c "import OpenSSL.SSL; print(OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION))"
+ coverage run --branch --source=OpenSSL setup.py test
+ coverage report -m