[tox] envlist = pep8,pip-check-reqs,cover,py35,py27 minversion = 2.0 skipsdist = True [testenv] usedevelop=True deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt basepython = python3 commands = python setup.py testr --testr-args='{posargs}' [testenv:venv] basepython = python2.7 commands = {posargs} [testenv:run] deps = -r{toxinidir}/requirements.txt commands = ospurge {posargs:--help} [testenv:pep8] skip_install = True whitelist_externals = bash deps = -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} bash -c "find {toxinidir}/tools -type f -name *.sh \ -print0 | xargs -0 bashate -v -iE006 -eE005,E042" [testenv:cover] commands = coverage erase python setup.py testr --coverage --omit="ospurge/tests/*" --testr-args='{posargs}' coverage report --omit="ospurge/tests/*" --show-missing --fail-under 100 [testenv:mypy] skip_install = True whitelist_externals = bash deps = -r{toxinidir}/test-requirements.txt mypy;python_version>'3.2' commands = bash -c 'mypy --fast-parser --disallow-untyped-calls --check-untyped-defs --disallow-untyped-defs --ignore-missing-imports ospurge | grep -v ospurge/tests/' [testenv:pip-check-reqs] # Do not install test-requirements as that will pollute the virtualenv for # determining missing packages. # This also means that pip-check-reqs must be installed separately, outside # of the requirements.txt files deps = -r{toxinidir}/requirements.txt pip_check_reqs commands= pip-extra-reqs -d ospurge pip-missing-reqs -d ospurge [testenv:docs] basepython = python3 whitelist_externals = echo skip_install = True deps = -r{toxinidir}/test-requirements.txt commands = doc8 -e .rst doc/source README.rst python setup.py build_sphinx -E echo "Documentation location: {toxinidir}/doc/build/html/index.html" [testenv:functional] commands = {toxinidir}/tools/func-tests.sh [flake8] ignore = H404,H405 enable-extensions = H106,H203,H904 show-source = True