[tox] envlist = py27,docs,pep8 [testenv] setenv = VIRTUAL_ENV={envdir} NOSE_WITH_OPENSTACK=1 NOSE_OPENSTACK_COLOR=1 NOSE_OPENSTACK_RED=0.05 NOSE_OPENSTACK_YELLOW=0.025 NOSE_OPENSTACK_SHOW_ELAPSED=1 NOSE_OPENSTACK_STDOUT=1 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} commands= py27: {[unit_tests]commands} py35: {[unit_tests]commands} [testenv:pep8] deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz commands = flake8 {posargs} [testenv:cover] setenv = VIRTUAL_ENV={envdir} NOSE_WITH_COVERAGE=1 NOSE_COVER_HTML_DIR={toxinidir}/cover NOSE_COVER_HTML=1 NOSE_COVER_ERASE=1 commands = {[unit_tests]commands} [testenv:py27] basepython = python2.7 deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz setenv = SWIFT_TEST_CONFIG_FILE={toxinidir}/test/sample.conf SWIFT_PROXY_TEST_CONFIG_FILE={toxinidir}/test/sample.proxy-server.conf commands = {[unit_tests]commands} [unit_tests] deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete find . -type d -name "__pycache__" -delete nosetests {posargs:test/unit} [testenv:venv] commands = {posargs} [flake8] exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,dash_template max-complexity = 20 import-order-style = pep8 [testenv:docs] deps = http://tarballs.openstack.org/swift/swift-stable-queens.tar.gz -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx [doc8] # File extensions to check extensions = .rst, .yaml # Maximal line length should be 80 but we have some overlong lines. # Let's not get far more in. max-line-length = 80 # Disable some doc8 checks: # D000: Check RST validity # - cannot handle "none" for code-block directive ignore = D000