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]
|
|
|
|
skipsdist = true
|
|
|
|
envlist =
|
|
|
|
py3
|
|
|
|
flake8
|
|
|
|
docs
|
2020-07-24 06:25:47 +00:00
|
|
|
isort >= 5.1.0
|
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)
|
|
|
|
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 =
|
2019-10-24 11:08:52 +00:00
|
|
|
py{3,36,37,38}: -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}
|
|
|
|
|
|
|
|
[testenv:flake8]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
|
|
|
deps = flake8
|
|
|
|
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
|
|
|
|
whitelist_externals =
|
|
|
|
make
|
|
|
|
deps =
|
|
|
|
Sphinx
|
|
|
|
pyenchant
|
|
|
|
sphinxcontrib-spelling
|
|
|
|
changedir = docs
|
|
|
|
commands =
|
|
|
|
make spelling
|
|
|
|
|
|
|
|
[testenv:isort]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = false
|
|
|
|
deps = isort
|
|
|
|
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}
|
|
|
|
whitelist_externals = npm
|
|
|
|
commands =
|
|
|
|
npm install
|
|
|
|
npm test
|