Added Tox for unit testing on different versions of Python
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,5 +1,10 @@
|
||||
*.pyc
|
||||
.*.swp
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
dist/
|
||||
MANIFEST
|
||||
/.coverage
|
||||
/.cache/
|
||||
/.tox/
|
||||
/pillar_sdk.egg-info/
|
||||
|
||||
25
.travis.yml
Normal file
25
.travis.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
language: python
|
||||
|
||||
# Python 3.5 specified to make tox environment 'py35' work.
|
||||
# See: https://github.com/travis-ci/travis-ci/issues/4794
|
||||
python:
|
||||
- 3.5
|
||||
|
||||
# Environment changes have to be manually synced with 'tox.ini'.
|
||||
# See: https://github.com/travis-ci/travis-ci/issues/3024
|
||||
env:
|
||||
- TOXENV=py27
|
||||
- TOXENV=py34
|
||||
- TOXENV=py35
|
||||
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- pip install coveralls
|
||||
|
||||
script:
|
||||
- tox
|
||||
|
||||
after_success:
|
||||
# Coveralls submission only for py35 environment, because of being the only
|
||||
# one that executes doctest-modules testing, according to tox.ini.
|
||||
- if [ ${TOXENV} = "py35" ]; then coveralls; fi
|
||||
10
requirements.txt
Normal file
10
requirements.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
pyOpenSSL==0.15.1
|
||||
requests==2.9.1
|
||||
six==1.10.0
|
||||
|
||||
tox>=2.3.1
|
||||
wheel>=0.29.0
|
||||
coverage>=3.5
|
||||
PyTest
|
||||
pytest-xdist
|
||||
pytest-cov
|
||||
20
tox.ini
Normal file
20
tox.ini
Normal file
@@ -0,0 +1,20 @@
|
||||
[tox]
|
||||
# Environment changes have to be manually synced with '.travis.yml'.
|
||||
envlist = py27,py34,py35
|
||||
|
||||
[pytest]
|
||||
addopts = -v --cov pillarsdk --cov-report term-missing
|
||||
|
||||
[testenv]
|
||||
commands=py.test []
|
||||
deps=coverage >=3.5
|
||||
PyTest
|
||||
pytest-xdist
|
||||
pytest-cov
|
||||
|
||||
; For now we skip doctests.
|
||||
;[testenv:py35]
|
||||
;commands=py.test --doctest-modules []
|
||||
|
||||
[pep8]
|
||||
max-line-length = 100
|
||||
Reference in New Issue
Block a user