[tox] minversion = 1.6 skipsdist = True #envlist = py35,py27,functional,pep8 envlist = py3,pep8,pep8diff [testenv] basepython=python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt install_command = pip install --no-cache-dir -U {opts} {packages} usedevelop = True setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=conductor/tests/unit passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE commands = coverage run --module pytest --junitxml xunit-results.xml oslo-config-generator --config-file=etc/conductor/conductor-config-generator.conf whitelist_externals = bash find [testenv:functional] setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=conductor/tests/functional/ passenv = CONDUCTOR_* commands = bash -x {toxinidir}/run-functional-tests.sh "{posargs}" [testenv:cover] setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US OS_TEST_PATH=conductor/tests/unit PYTHON=coverage run --source conductor --omit='*tests*' --parallel-mode commands = coverage erase find . -type f -name "*.pyc" -delete find . -type f -name ".coverage.*" -delete coverage run --module pytest --junitxml xunit-results.xml coverage html -d cover coverage xml -o cover/coverage.xml coverage report --omit=".tox/*","conductor/tests/*" [testenv:pep8] deps = hacking>=2.0.0 commands = flake8 --exit-zero [testenv:pep8diff] deps = hacking>=2.0.0 commands = bash -c "files=$(git diff HEAD^ HEAD --relative --diff-filter=d --name-only | grep -E '(^conductor\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi" [testenv:genconfig] commands = oslo-config-generator --config-file=etc/conductor/conductor-config-generator.conf [testenv:venv] commands = {posargs} setenv = PYTHONHASHSEED=0 [testenv:debug] commands = bash -x oslo_debug_helper {posargs} [flake8] select = E,H,W,F max-line-length = 119 exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,install-guide,*/tests/*,__init__.py,conductor/data/service.py show-source = True ignore = W503 H904 #conflict with W504 per-file-ignores = conductor/data/plugins/inventory_provider/aai.py:F821, conductor/common/sms.py:F401 [hacking] import_exceptions = conductor.common.i18n