heat-translator/tox.ini
Jeremy Stanley 3562f7cc2e Fix coverage so that it works for this repo
PBR provides test and testr entrypoints, the latter of which is not
recommended as its serviced directly by testr. Switch to test in
tox.ini and pass an option to PBR indicating the correct package
name to use when calling coverage. Also update .coveragerc with the
corrected source path, and stop omitting the tests themselves (after
all, tests should cover themselves!).

Change-Id: I04b1a5393979c5d82a794d35189743f688bdfdd8
2015-04-07 18:35:46 +00:00

38 lines
902 B
INI

[tox]
minversion = 1.6
envlist = py26,py27,py33,py34,pypy,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name=translator --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper -t translator/tests {posargs}
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,H803
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build