[tox]
envlist = py27
skipsdist=True

[testenv]
basepython = python2.7
commands = py.test --cov-report=html \
                   --cov-report=term \
		   --cov=leap.soledad \
		   {posargs}
usedevelop = True
deps =
    coverage
    pytest
    pytest-cov
    pytest-twisted
    mock
    testscenarios
    setuptools-trial
    pdbpp
    couchdb
    requests
    service_identity
# install soledad local packages
    -e../common
    -e../client
    -e../server
setenv =
    HOME=/tmp
    TERM=xterm
install_command = pip install {opts} {packages}

[testenv:perf]
deps =
    {[testenv]deps}
    pytest-benchmark
commands = py.test tests/perf {posargs}

[testenv:code-check]
changedir = ..
deps =
    pep8
    flake8
commands =
    pep8 client server common
    flake8 --ignore=F812,E731 client server common

[testenv:parallel]
deps =
    {[testenv]deps}
    pytest-xdist
install_command = pip install {opts} {packages}
commands = py.test {posargs} -n 4