[tox]
envlist = py26,py27

[testenv]
# ignore_errors makes sure all commands get run, which means this won't abort if flake8 fails.
# it doesn't affect the return code in the end.
ignore_errors=True
setenv =
    PYTHONDONTWRITEBYTECODE=1
    PYTHONPATH={toxinidir}/vendor/lib/python
deps =
# test deps
    certifi
    coverage
    flake8
    mock
    ordereddict
    Paste
    pyflakes
    pytest
    pytest-cov

commands=
    flake8 auslib scripts balrog.wsgi admin.wsgi uwsgi
    py.test --cov=. --doctest-modules {posargs:auslib}
    coverage run -a scripts/test-rules.py

[testenv:py26]
basepython=python2.6

[testenv:py26-coveralls]
deps=
    python-coveralls
commands=
    coveralls

[testenv:py27]
basepython=python2.7

[testenv:py27-coveralls]
deps=
    python-coveralls
commands=
    coveralls

[flake8]
max-line-length = 160
exclude = .ropeproject,.tox,sandbox,build
show-source = True
ignore = E402

[pytest]
norecursedirs = .tox .git .hg sandbox build
python_files = test_*.py

[tox]
envlist = py26,py27

[testenv]
# ignore_errors makes sure all commands get run, which means this won't abort if flake8 fails.
# it doesn't affect the return code in the end.
ignore_errors=True
setenv =
    PYTHONDONTWRITEBYTECODE=1
    PYTHONPATH={toxinidir}/vendor/lib/python
deps =
# test deps
    certifi
    coverage
    flake8
    mock
    ordereddict
    Paste
    pyflakes
    pytest
    pytest-capturelog
    pytest-cov

commands=
    flake8 auslib scripts balrog.wsgi admin.wsgi uwsgi
    py.test --cov=. --doctest-modules {posargs:auslib}
    coverage run -a scripts/test-rules.py

[testenv:py26]
basepython=python2.6

[testenv:py26-coveralls]
deps=
    python-coveralls
commands=
    coveralls

[testenv:py27]
basepython=python2.7

[testenv:py27-coveralls]
deps=
    python-coveralls
commands=
    coveralls

[flake8]
max-line-length = 160
exclude = .ropeproject,.tox,sandbox,build
show-source = True
ignore = E402

[pytest]
norecursedirs = .tox .git .hg sandbox build
python_files = test_*.py

Use pytest-capturelog to make sure logging messages are shown along with test failures. r=rail
Use pytest-capturelog to make sure logging messages are shown along with test failures. r=rail
