Add tox configuration for lint and testing

This commit is contained in:
James Page 2015-12-04 14:23:24 +00:00
parent 707613c145
commit c2b6c46c5e
3 changed files with 29 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.tox

3
test-requirements.txt Normal file
View File

@ -0,0 +1,3 @@
flake8>=2.2.4,<=2.4.1
os-testr>=0.4.1
charm-tools

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
envlist = lint,py27
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
[testenv:lint]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs} lib
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E402,E226