[tox]
envlist =
    {py36,py37,py38,py39}, lint, documents

[testenv]
passenv = LANG
deps=
    -rrequirements/project.txt
    -rrequirements/extra.txt
    -rrequirements/test.txt
commands=
    {envbindir}/py.test --cov pymdownx --cov-append {toxinidir}
    {envbindir}/coverage html -d {envtmpdir}/coverage
    {envbindir}/coverage xml
    {envbindir}/coverage report --show-missing

[testenv:documents]
deps=
    -rrequirements/docs.txt
    -rrequirements/extra.txt
commands=
    {envpython} -m pip install .
    {envpython} -m mkdocs build --clean --verbose --strict
    {envpython} -m pyspelling

[testenv:lint]
deps=
    -rrequirements/project.txt
    -rrequirements/extra.txt
    -rrequirements/lint.txt
commands=
    {envbindir}/flake8 {toxinidir}

[flake8]
exclude=build/*,.tox/*,.c9/*,site/*,tools/tags/*,node_modules/*,*_db.py
max-line-length=120
ignore=D202,N802,D203,D401,W504,N813,E741

[pytest]
addopts=--ignore=tools --ignore=node_modules
