2017-10-06 21:02:17 +08:00
|
|
|
# Tox (https://tox.readthedocs.io/) is a tool for running tests in multiple
|
2016-06-20 05:08:41 +08:00
|
|
|
# virtualenvs. This configuration file helps to run the test suite on all
|
2019-04-14 23:02:36 +08:00
|
|
|
# supported Python versions. To use it, "python -m pip install tox" and
|
|
|
|
# then run "tox" from this directory.
|
2016-06-20 05:08:41 +08:00
|
|
|
|
|
|
|
[tox]
|
|
|
|
skipsdist = true
|
|
|
|
envlist =
|
|
|
|
py3
|
|
|
|
flake8
|
|
|
|
docs
|
|
|
|
isort
|
|
|
|
|
2017-01-26 02:59:25 +08:00
|
|
|
# Add environment to use the default python3 installation
|
2016-06-20 05:08:41 +08:00
|
|
|
[testenv:py3]
|
|
|
|
basepython = python3
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = true
|
2016-08-24 19:02:35 +08:00
|
|
|
passenv = DJANGO_SETTINGS_MODULE PYTHONPATH HOME DISPLAY
|
|
|
|
setenv =
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
2016-06-20 05:08:41 +08:00
|
|
|
deps =
|
2020-10-13 14:35:01 +08:00
|
|
|
py{3,36,37,38,39}: -rtests/requirements/py3.txt
|
2016-06-20 05:08:41 +08: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-26 02:59:25 +08:00
|
|
|
basepython = python3
|
2016-06-20 05:08:41 +08: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}
|
|
|
|
commands = isort --recursive --check-only --diff django tests scripts
|
|
|
|
|
|
|
|
[testenv:javascript]
|
|
|
|
usedevelop = false
|
|
|
|
deps =
|
|
|
|
changedir = {toxinidir}
|
|
|
|
whitelist_externals = npm
|
|
|
|
commands =
|
|
|
|
npm install
|
|
|
|
npm test
|