mirror of
https://github.com/django/django.git
synced 2024-11-24 20:07:01 +01:00
68 lines
1.5 KiB
INI
68 lines
1.5 KiB
INI
# 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]
|
|
skipsdist = true
|
|
envlist =
|
|
py3
|
|
flake8
|
|
docs
|
|
isort
|
|
|
|
# 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 =
|
|
py{3,36,37,38}: -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:flake8]
|
|
basepython = python3
|
|
usedevelop = false
|
|
deps = flake8
|
|
changedir = {toxinidir}
|
|
commands = flake8 .
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
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}
|
|
commands = isort --recursive --check-only --diff django tests scripts
|
|
|
|
[testenv:javascript]
|
|
usedevelop = false
|
|
deps =
|
|
changedir = {toxinidir}
|
|
whitelist_externals = npm
|
|
commands =
|
|
npm install
|
|
npm test
|