[tox]
envlist = coverage

[pytest]
timeout = 540

[testenv]
deps =
    -rrequirements-dev.txt
commands =
    coverage erase
    pytest --cov-append --exitfirst {posargs:./raiden/tests/unit ./raiden/tests/smart_contracts ./raiden/tests/integration/api ./raiden/tests/integration}

[testenv:flake8]
deps =
    flake8
commands=
    flake8  --exit-zero raiden/ tools/

[testenv:devenv]
envdir = devenv
basepython = python2.7
usedevelop = True
deps =
    -rrequirements-dev.txt
commands = pytest --cov-append --exitfirst {posargs:./raiden/}

[testenv:smart_contracts]
commands = pytest --cov-append --initial-port=2000 --exitfirst ./raiden/tests/smart_contracts {posargs}

[testenv:integration]
commands = pytest --cov-append --initial-port=3000 --exitfirst ./raiden/tests/integration {posargs}

[testenv:unit]
commands = pytest --cov-append --initial-port=4000 --exitfirst ./raiden/tests/unit {posargs}

[testenv:api]
commands = pytest --cov-append --initial-port=5000 --exitfirst ./raiden/tests/integration/api {posargs}

[tox]
envlist = coverage

[pytest]
timeout = 540
norecursedirs = node_modules

[testenv]
deps =
    -rrequirements-dev.txt
commands =
    coverage erase
    pytest --cov-append --exitfirst {posargs:./raiden/tests/unit ./raiden/tests/smart_contracts ./raiden/tests/integration/api ./raiden/tests/integration}

[testenv:flake8]
deps =
    flake8
commands=
    flake8  --exit-zero raiden/ tools/

[testenv:devenv]
envdir = devenv
basepython = python2.7
usedevelop = True
deps =
    -rrequirements-dev.txt
commands = pytest --cov-append --exitfirst {posargs:./raiden/}

[testenv:smart_contracts]
commands = pytest --cov-append --initial-port=2000 --exitfirst ./raiden/tests/smart_contracts {posargs}

[testenv:integration]
commands = pytest --cov-append --initial-port=3000 --exitfirst ./raiden/tests/integration {posargs}

[testenv:unit]
commands = pytest --cov-append --initial-port=4000 --exitfirst ./raiden/tests/unit {posargs}

[testenv:api]
commands = pytest --cov-append --initial-port=5000 --exitfirst ./raiden/tests/integration/api {posargs}

Exclude node_modules directory from pytest detection
Exclude node_modules directory from pytest detection

After building the web ui if you attempt to run all the tests using pytest raiden, it will try to collect tests in the web-ui's node_modules directory that belong to the node-gyp tool. This will cause the collection process to fail
