Skip to content
Snippets Groups Projects
tox.ini 857 B
Newer Older
jpic ∞'s avatar
jpic ∞ committed
envlist = py{38,39}-dj{20,21,30,31}

[testenv]
usedevelop = true

commands =
jpic ∞'s avatar
jpic ∞ committed
    pip install -e {toxinidir}[project]
    pytest -vv --cov src --cov-report=xml:coverage.xml --cov-report=term-missing --strict -r fEsxXw {posargs:src}
    pytest-django
James Pic's avatar
James Pic committed
    pytest-mock
jpic ∞'s avatar
jpic ∞ committed
    dj20: Django>=2.0,<2.1
    dj21: Django>=2.1,<2.2
Daniel Hahler's avatar
Daniel Hahler committed
    dj30: Django>=3.0,<3.1
James Pic's avatar
James Pic committed
    DEBUG=1
James Pic's avatar
James Pic committed
[testenv:qa]
jpic ∞'s avatar
jpic ∞ committed
    flake8 --show-source --max-complexity=8 --exclude migrations src/ --builtins=ModuleNotFoundError --ignore F405,W503
    flake8
    mccabe

[flake8]
exclude = crudlfap_example
putty-auto-ignore = true
putty-ignore =
    crudlfap/shortcuts.py : F401
    crudlfap/test_routers.py : D

[pytest]
testpaths = src
DJANGO_SETTINGS_MODULE = crudlfap_example.settings