| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 
 | # Tox (https://tox.readthedocs.io/) is a tool for running tests in multiple
# virtualenvs. This configuration file helps to run the test suite on all
# supported Python versions. To use it, "python -m pip install tox" and
# then run "tox" from this directory.
[tox]
minversion = 4.0
skipsdist = true
envlist =
    py3
    black
    blacken-docs
    flake8
    docs
    isort
    lint-docs
# Add environment to use the default python3 installation
[testenv:py3]
basepython = python3
[testenv]
usedevelop = true
# OBJC_DISABLE_INITIALIZE_FORK_SAFETY fixes hung tests for MacOS users. (#30806)
passenv = DJANGO_SETTINGS_MODULE,PYTHONPATH,HOME,DISPLAY,OBJC_DISABLE_INITIALIZE_FORK_SAFETY
setenv =
    PYTHONDONTWRITEBYTECODE=1
deps =
    -e .
    py{3,312,313,314}: -rtests/requirements/py3.txt
    postgres: -rtests/requirements/postgres.txt
    mysql: -rtests/requirements/mysql.txt
    oracle: -rtests/requirements/oracle.txt
changedir = tests
commands =
    {envpython} runtests.py {posargs}
[testenv:black]
basepython = python3
usedevelop = false
deps = black
changedir = {toxinidir}
commands = black --check --diff .
[testenv:blacken-docs]
basepython = python3
usedevelop = false
allowlist_externals =
    make
deps = blacken-docs
changedir = docs
commands =
    make black
[testenv:flake8]
basepython = python3
usedevelop = false
deps = flake8 >= 3.7.0
changedir = {toxinidir}
commands = flake8 .
[testenv:docs]
basepython = python3
usedevelop = false
allowlist_externals =
    make
deps =
    Sphinx
    pyenchant
    sphinxcontrib-spelling
changedir = docs
commands =
    make spelling
[testenv:isort]
basepython = python3
usedevelop = false
deps = isort >= 7.0.0
changedir = {toxinidir}
commands = isort --check-only --diff django tests scripts
[testenv:javascript]
usedevelop = false
deps =
changedir = {toxinidir}
allowlist_externals =
    npm
commands =
    npm install
    npm test
[testenv:lint-docs]
basepython = python3
usedevelop = false
allowlist_externals =
    make
deps = sphinx-lint
changedir = docs
commands =
    make lint
 |