Add tox for testing

This commit is contained in:
Paul Moore 2018-07-22 15:55:56 +01:00
parent 6261bd944d
commit 2fec31827b
5 changed files with 17 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
__pycache__/
*.pyc
/dist/
.tox
.pytest_cache

View File

@ -5,5 +5,5 @@ python:
- "3.4"
- "3.3"
- "2.7"
install: pip install testpath pytoml
script: py.test
install: pip install tox
script: tox -e py

View File

@ -14,7 +14,7 @@ environment:
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python --version"
- "pip install pytest mock testpath pytoml"
- "pip install tox"
build: off
@ -22,4 +22,4 @@ cache:
- '%LOCALAPPDATA%\pip\Cache'
test_script:
- "pytest"
- "tox -e py"

4
dev-requirements.txt Normal file
View File

@ -0,0 +1,4 @@
pytest
mock
testpath
pytoml

7
tox.ini Normal file
View File

@ -0,0 +1,7 @@
[tox]
envlist = py27, py34, py35, py36, py37, pypy, pypy3
skipsdist = true
[testenv]
deps = -rdev-requirements.txt
commands = pytest []