[tox]
minversion = 1.6
envlist = py27,py34,pep8,docs
skipsdist = True

[testenv]
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = nosetests --with-coverage --cover-package imap_cli --cover-min-percentage 85 --cover-erase -v
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
sitepackages = False
usedevelop = True

[testenv:docs]
basepython=python
changedir=docs
deps= sphinx
envtmpdir=_build
commands=
    sphinx-build -W -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html

[testenv:pep8]
commands = flake8 {posargs}

[flake8]
show-source = True
ignore = H803
max-line-length = 120
exclude = .venv,.tox,dist,docs,*.egg,.update-venv

[hacking]
import_exceptions = six.moves.ConfigParser

[tox]
minversion = 1.6
envlist = py27,py34,pep8,docs
skipsdist = True

[testenv]
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
    coverage erase
    coverage run {envbindir}/nosetests -v
    coverage report --fail-under=85 --include=*imap_cli* --omit=*tests*
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
sitepackages = False
usedevelop = True

[testenv:docs]
basepython=python
changedir=docs
deps= sphinx
envtmpdir=_build
commands=
    sphinx-build -W -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html

[testenv:pep8]
commands = flake8 {posargs}

[flake8]
show-source = True
ignore = H803
max-line-length = 120
exclude = .venv,.tox,dist,docs,*.egg,.update-venv

[hacking]
import_exceptions = six.moves.ConfigParser

Use coverage instead of nose for tests
Use coverage instead of nose for tests

This allow to clarify "commands" line in tox.ini files by splitting into 3 commands.
