2017-10-06 13:02:17 +00:00
|
|
|
# Tox (https://tox.readthedocs.io/) is a tool for running tests in multiple
|
2016-06-19 21:08:41 +00:00
|
|
|
# virtualenvs. This configuration file helps to run the test suite on all
|
2019-04-14 15:02:36 +00:00
|
|
|
# supported Python versions. To use it, "python -m pip install tox" and
|
|
|
|
# then run "tox" from this directory.
|
2016-06-19 21:08:41 +00:00
|
|
|
|
|
|
|
[tox]
|
2020-10-24 20:17:46 +00:00
|
|
|
minversion = 3.18
|
2016-06-19 21:08:41 +00:00
|
|
|
skipsdist = true
|
|
|
|
envlist =
|
|
|
|
py3
|
2022-02-02 10:36:57 +00:00
|
|
|
black
|
2023-02-28 12:14:51 +00:00
|
|
|
blacken-docs
|
2022-09-24 16:32:42 +00:00
|
|
|
flake8
|
2016-06-19 21:08:41 +00:00
|
|
|
docs
|
2022-09-24 16:32:42 +00:00
|
|
|
isort
|
2016-06-19 21:08:41 +00:00
|
|
|
|
2017-01-25 18:59:25 +00:00
|
|
|
# Add environment to use the default python3 installation
|
2016-06-19 21:08:41 +00:00
|
|
|
[testenv:py3]
|
|
|
|
basepython = python3
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = true
|
2019-09-26 21:07:26 +00:00
|
|
|
# OBJC_DISABLE_INITIALIZE_FORK_SAFETY fixes hung tests for MacOS users. (#30806)
|
2023-01-25 05:09:57 +00:00
|
|
|
passenv = DJANGO_SETTINGS_MODULE,PYTHONPATH,HOME,DISPLAY,OBJC_DISABLE_INITIALIZE_FORK_SAFETY
|
2016-08-24 11:02:35 +00:00
|
|
|
setenv =
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
2016-06-19 21:08:41 +00:00
|
|
|
deps =
|
2023-01-18 08:46:01 +00:00
|
|
|
py{3,310,311}: -rtests/requirements/py3.txt
|
2016-06-19 21:08:41 +00:00
|
|
|
postgres: -rtests/requirements/postgres.txt
|
|
|
|
mysql: -rtests/requirements/mysql.txt
|
|
|
|
oracle: -rtests/requirements/oracle.txt
|
|
|
|
changedir = tests
|
|
|
|
commands =
|
|
|
|
{envpython} runtests.py {posargs}
|
|
|
|
|
2022-02-02 10:36:57 +00:00
|
|
|
[testenv:black]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
|
|
|
deps = black
|
|
|
|
changedir = {toxinidir}
|
|
|
|
commands = black --check --diff .
|
|
|
|
|
2023-02-28 12:14:51 +00:00
|
|
|
[testenv:blacken-docs]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
|
|
|
allowlist_externals =
|
|
|
|
make
|
|
|
|
deps = blacken-docs
|
|
|
|
changedir = docs
|
|
|
|
commands =
|
|
|
|
make black
|
|
|
|
|
2016-06-19 21:08:41 +00:00
|
|
|
[testenv:flake8]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
2022-09-24 16:32:42 +00:00
|
|
|
deps = flake8 >= 3.7.0
|
2016-06-19 21:08:41 +00:00
|
|
|
changedir = {toxinidir}
|
|
|
|
commands = flake8 .
|
|
|
|
|
|
|
|
[testenv:docs]
|
2017-01-25 18:59:25 +00:00
|
|
|
basepython = python3
|
2016-06-19 21:08:41 +00:00
|
|
|
usedevelop = false
|
2020-10-24 20:17:46 +00:00
|
|
|
allowlist_externals =
|
2016-06-19 21:08:41 +00:00
|
|
|
make
|
|
|
|
deps =
|
|
|
|
Sphinx
|
|
|
|
pyenchant
|
|
|
|
sphinxcontrib-spelling
|
|
|
|
changedir = docs
|
|
|
|
commands =
|
|
|
|
make spelling
|
|
|
|
|
|
|
|
[testenv:isort]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
2022-09-24 16:32:42 +00:00
|
|
|
deps = isort >= 5.1.0
|
2016-06-19 21:08:41 +00:00
|
|
|
changedir = {toxinidir}
|
2020-07-24 06:25:47 +00:00
|
|
|
commands = isort --check-only --diff django tests scripts
|
2016-06-19 21:08:41 +00:00
|
|
|
|
|
|
|
[testenv:javascript]
|
|
|
|
usedevelop = false
|
|
|
|
deps =
|
|
|
|
changedir = {toxinidir}
|
2021-02-10 15:40:43 +00:00
|
|
|
allowlist_externals =
|
|
|
|
npm
|
2016-06-19 21:08:41 +00:00
|
|
|
commands =
|
|
|
|
npm install
|
|
|
|
npm test
|