[tox]
envlist = py27,py34,py35,py36,cov-report,cov-store

[testenv]
use_develop = true
deps =
    py27: mock==2.0.0
    -r{toxinidir}/requirements-test.txt
setenv =
    COVERAGE_FILE = tests/.coverage.{envname}
    PYTHONDONTWRITEBYTECODE=1
commands =
    coverage run -m pytest {toxinidir}/tests

[testenv:cov-report]
skip_install = true
setenv =
    COVERAGE_FILE = tests/.coverage
deps =
    -r{toxinidir}/requirements-cov.txt
commands =
    coverage combine tests
    coverage report

[testenv:cov-store]
skip_install = true
setenv =
    COVERAGE_FILE = tests/.coverage
deps =
    -r{toxinidir}/requirements-cov.txt
commands =
    coverage html


[flake8]
ignore = E712, E711, C901
max-complexity = 10

[pytest]
addopts =  -vvl --strict --flake8 --capture fd

