Add pytest and tox to run tests

This commit is contained in:
ant31 2016-11-24 15:18:22 +01:00
parent 1529ed2086
commit 2eaa8a4a1b
8 changed files with 98 additions and 5 deletions

17
tox.ini Normal file
View file

@ -0,0 +1,17 @@
[tox]
envlist = {py27}-{unittest,api}
skipsdist = True
[testenv]
basepython =
py27: python2.7
deps =
-r{toxinidir}/requirements-tests.txt
-r{toxinidir}/requirements.txt
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}
TEST=true
api: FILE="registry_tests.py"
unittest: FILE=""
commands =
py.test --verbose test/{env:FILE} -vv {posargs}