[tox]
envlist = py27,pypy,pep8
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = nosetests

[testenv:pep8]
commands = flake8

[testenv:venv]
commands = {posargs}

[tox:jenkins]
downloadcache = ~/cache/pip

[flake8]
max-line-length = 120
# TODO: ignored checks should be enabled in the future 
# H201  no 'except:' at least use 'except Exception:'
# H302  import only modules
# H305  imports not grouped correctly
# H307  like imports should be grouped together
# H405  multi line docstring summary not separated with an empty line
# H904  Wrap long lines in parentheses instead of a backslash
ignore = F821,H201,H302,H305,H307,H405,H904,E126,E125,H306,E302,E122
exclude=.venv,.git,.tox,dist,*openstack/common*,*egg,build

[tox]
envlist = py27,pypy,pep8
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
whitelist_externals = find
commands =
  find . -type f -name "*.pyc" -delete
  nosetests

[testenv:pep8]
commands = flake8

[testenv:venv]
commands = {posargs}

[tox:jenkins]
downloadcache = ~/cache/pip

[flake8]
max-line-length = 120
# TODO: ignored checks should be enabled in the future 
# H201  no 'except:' at least use 'except Exception:'
# H302  import only modules
# H305  imports not grouped correctly
# H307  like imports should be grouped together
# H405  multi line docstring summary not separated with an empty line
# H904  Wrap long lines in parentheses instead of a backslash
ignore = F821,H201,H302,H305,H307,H405,H904,E126,E125,H306,E302,E122
exclude=.venv,.git,.tox,dist,*openstack/common*,*egg,build

Delete python bytecode before every test run
Delete python bytecode before every test run

Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: Ifc8df1634336fdfd298c353ad808c77f48b87b68
Closes-Bug: #1368661
