[tox]
minversion = 3.5
# relies on the correct version of Python installed
envlist = py3,pylint,mypy

[testenv]
passenv =
    CI CI_* CIRCLE*
    HOME # necessary for run script to inject path to hug
    MY_CONFIG
commands =
    pip install -e .[testing]
    pip install -e .[all]
    python -m pytest src/promnesia/cannon.py src/promnesia/kython
    python -m pytest -m 'not with_browser' {posargs}


# TODO instead collect with_browser??
[testenv:end2end]
commands =
    pip install -e .[testing]
    python -m pytest          tests/end2end_test.py {posargs}


[testenv:mypy]
skip_install = true
commands =
    pip install -e .[linting]
    pip install -e .[HPI]
    python -m mypy src


[testenv:pylint]
skip_install = true
commands =
    pip install -e .[linting]
    pip install -e .[all]
    python -m pylint -E src/promnesia
