requirements/tox.ini
Doug Hellmann 2dbf39295c Move data validation out of the unit tests and strengthen
Having the data validation happening inside the unit tests makes
understanding requirement update failures confusing because the output
is hard to read and does not explain what the error actually is. Move
the checks to their own command and set up a tox env to run it. A
separate patch in project-config will add a new job for the repository.

Address the dedent comment from
https://review.openstack.org/#/c/204181/3/openstack_requirements/tests/test_requirement.py,cm

Add a test to ensure that all items in global-requirements.txt are also
listed in either upper-constraints.txt or blacklist.txt. Ignore a few
items that we don't know how to constrain yet.

Add a test to ensure that items in blacklist.txt are not in
upper-constraints.txt.

Change-Id: Icb717b0f36afb6ea29f50bc6935917dddf47fd4c
2015-08-03 20:45:37 +00:00

37 lines
851 B
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = validate,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands =
python setup.py testr --slowest --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
[testenv:update]
commands = update-requirements {posargs}
[testenv:generate]
commands = generate-constraints {posargs}
[testenv:validate]
commands = validate-constraints {toxinidir}/global-requirements.txt {toxinidir}/upper-constraints.txt {toxinidir}/blacklist.txt
# work around until pypy vs. setuptools issue in bug 1290562 is fixed
[testenv:pypy]
deps = setuptools>3.4
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
commands = flake8
[flake8]
ignore = H803
exclude = .venv,.git,.tox,dist,doc,*egg,build