[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:}
envlist = py2-pylint-coverage

[testenv]
sitepackages = true
setenv =
    PYTHONPATH={toxinidir}{:}{env:PYTHONPATH:}
    PYTHONHASHSEED=0
    DJANGO_SETTINGS_MODULE=wcs.settings
    WCS_SETTINGS_FILE=tests/settings.py
    LC_ALL=C
    LC_TIME=C
    LANG=C
    coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov-report html --cov=wcs/ --cov-config .coveragerc -v
passenv =
    USER
deps =
    pytest
    pytest-mock
    pytest-cov
    pytest-django
    WebTest
    mechanize
    gadjo
    pyquery
    git+https://git.entrouvert.org/debian/django-ckeditor.git
    django >=1.11, <1.12
    django-ratelimit<3
    pyproj
    pylint<1.8
commands =
    py.test {env:COVERAGE:} {posargs:tests/}
    pylint: ./pylint.sh wcs/
