monasca-common/tox.ini
Kaiyan Sheng 741a24e41a [monasca-common] Constraint tox targets with upper-constraints
This review is to prepare for adding monasca-common into openstack
global-requirements. After this project gets into global requirements,
it will be in upper-constraints.txt. If we make changes on this
specific project, we need to replace it in the upper-constraints with
source based specifier before applying it to pip install.

Change-Id: I67a3e3fcb833e273900c490643197988efd5eb3b
2016-05-20 16:45:58 -06:00

33 lines
923 B
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command =
{toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = find
commands =
find . -type f -name "*.pyc" -delete
nosetests --with-coverage --cover-package=monasca_common/. --cover-erase
[testenv:pep8]
commands = flake8 monasca_common
[testenv:venv]
# TODO: remove once infra supports constraints for this target
install_command = pip install -U {opts} {packages}
commands = {posargs}
[flake8]
max-complexity = 50
max-line-length = 120
builtins = _
ignore = F821,H201,H302,H305,H307,H405,H904
exclude=.venv,.git,.tox,dist,*openstack/common*,*egg,build
show-source = True