Add tox and testr config and fix apt_pkg error exposed by tox unit_test run

This commit is contained in:
Liam Young
2016-05-24 15:50:48 +00:00
parent 13571d0fb1
commit f4b4fd658e
8 changed files with 72 additions and 1 deletions

29
tox.ini Normal file
View File

@@ -0,0 +1,29 @@
[tox]
envlist = pep8,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}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
basepython = python2.7
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = flake8 {posargs} hooks unit_tests tests actions
charm-proof
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E402,E226
exclude = hooks/charmhelpers