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