93 lines
2.3 KiB
INI
93 lines
2.3 KiB
INI
[tox]
|
|
envlist = py27,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv =
|
|
PYTHONUNBUFFERED=1
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=tests/unit
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
psutil==3.0.1
|
|
whitelist_externals = bash
|
|
find
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
setenv = {[testenv]setenv}
|
|
OS_TEST_PATH=tests/unit
|
|
whitelist_externals =
|
|
{[testenv]whitelist_externals}
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
ostestr {posargs}
|
|
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
setenv = {[testenv]setenv}
|
|
OS_TEST_PATH=tests/unit
|
|
whitelist_externals =
|
|
{[testenv]whitelist_externals}
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
ostestr {posargs}
|
|
|
|
[testenv:functional]
|
|
basepython = python2.7
|
|
install_command = {[testenv]install_command}
|
|
setenv = {[testenv]setenv}
|
|
SPARK_HOME=/opt/spark/current
|
|
SPARK_SCALA_VERSION=2.10
|
|
OS_TEST_PATH=tests/functional
|
|
whitelist_externals =
|
|
{[testenv]whitelist_externals}
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
ostestr --serial {posargs}
|
|
|
|
[testenv:functional-py35]
|
|
basepython = python3.5
|
|
install_command = {[testenv]install_command}
|
|
setenv = {[testenv]setenv}
|
|
SPARK_HOME=/opt/spark/current
|
|
OS_TEST_PATH=tests/functional
|
|
whitelist_externals =
|
|
{[testenv]whitelist_externals}
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
ostestr --serial {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
|
# tests conflict with coverage.
|
|
commands =
|
|
find monasca_transform -type f -name "*.pyc" -delete
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[flake8]
|
|
max-complexity = 30
|
|
# TODO: ignored checks should be enabled in the future
|
|
# H904 Wrap long lines in parentheses instead of a backslash (DEPRECATED)
|
|
# H405 Multiline docstring separated by empty line
|
|
# E402 module level import not at top of file FIXME remove this
|
|
ignore = H904,H405,E402
|
|
show-source = True
|
|
exclude=.venv,.git,.tox,dist,*egg,build
|