c6b7454ace
We do not need tox_install.sh, pip can handle constraints itself and install the project correctly. Thus update tox.ini and remove the now obsolete tools/tox_install.sh file. This follows https://review.openstack.org/#/c/508061 to remove tools/tox_install.sh. Change-Id: I52592965b7f15aeee0605d39d5038f045674be70
74 lines
1.9 KiB
INI
74 lines
1.9 KiB
INI
[tox]
|
||
envlist = py27,py35,pep8,pylint,docs
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
deps =
|
||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
|
||
install_command = pip install {opts} {packages}
|
||
setenv = VIRTUAL_ENV={envdir}
|
||
|
||
whitelist_externals =
|
||
find
|
||
coverage
|
||
rm
|
||
|
||
python_files = test_*.py
|
||
norecursedirs = .tox .venv
|
||
|
||
[testenv:venv]
|
||
commands = {posargs}
|
||
|
||
[testenv:py27]
|
||
basepython = python2.7
|
||
setenv =
|
||
OS_TEST_PATH = ./freezerclient/tests/unit
|
||
commands =
|
||
find . -type f -name "*.py[c|o]" -delete
|
||
python setup.py testr --coverage --testr-args="{posargs}"
|
||
coverage report -m
|
||
rm -f .coverage
|
||
rm -rf .testrepository
|
||
|
||
[testenv:py35]
|
||
basepython = python3.5
|
||
setenv =
|
||
OS_TEST_PATH = ./freezerclient/tests/unit
|
||
commands =
|
||
find . -type f -name "*.py[c|o]" -delete
|
||
python setup.py testr --coverage --testr-args="{posargs}"
|
||
coverage report -m
|
||
rm -f .coverage
|
||
rm -rf .testrepository
|
||
|
||
[testenv:docs]
|
||
commands =
|
||
python setup.py build_sphinx
|
||
|
||
[testenv:pep8]
|
||
commands = flake8 freezerclient
|
||
|
||
[testenv:pylint]
|
||
commands = pylint --rcfile .pylintrc freezerclient
|
||
|
||
[flake8]
|
||
# Ignored hackings:
|
||
# H104 -> empty file, only comments
|
||
# H202 -> assertRaises(Exception, ...) too broad
|
||
# H404 -> Multi line docstrings should start without a leading new line.
|
||
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
|
||
ignore = H104,H202,H404,H405
|
||
# H106: Don’t put vim configuration in source files
|
||
# H203: Use assertIs(Not)None to check for None
|
||
enable-extensions=H106,H203
|
||
show-source = True
|
||
exclude = .venv,.tox,dist,doc,*egg,releasenotes
|
||
|
||
|
||
[testenv:releasenotes]
|
||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|