mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
563b043768
Erroring on deprecation or pending deprecation warnings means they are caught early. This will avoid the cycle of releasing with 'support for Django X', then chasing all the deprecation warnings one-by-one. Instead, when a new Django version is added to the test matrix, it will fail until all the relevant warnings are fixed. This avoids passing these warnings on to users, some of whom don't upgrade until they are all fixed.
55 lines
1.5 KiB
INI
55 lines
1.5 KiB
INI
[tox]
|
|
envlist =
|
|
{py35,py36,py37}-django22,
|
|
{py36,py37,py38}-django30,
|
|
{py36,py37,py38,py39}-django31,
|
|
{py36,py37,py38,py39}-djangomaster,
|
|
base,dist,lint,docs,
|
|
|
|
[travis:env]
|
|
DJANGO =
|
|
2.2: django22
|
|
3.0: django30
|
|
3.1: django31
|
|
master: djangomaster
|
|
|
|
[testenv]
|
|
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --fast --coverage {posargs}
|
|
envdir = {toxworkdir}/venvs/{envname}
|
|
setenv =
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
PYTHONWARNINGS=once
|
|
deps =
|
|
django22: Django>=2.2,<3.0
|
|
django30: Django>=3.0,<3.1
|
|
django31: Django>=3.1,<3.2
|
|
djangomaster: https://github.com/django/django/archive/master.tar.gz
|
|
-rrequirements/requirements-testing.txt
|
|
-rrequirements/requirements-optionals.txt
|
|
|
|
[testenv:base]
|
|
; Ensure optional dependencies are not required
|
|
deps =
|
|
django
|
|
-rrequirements/requirements-testing.txt
|
|
|
|
[testenv:dist]
|
|
commands = ./runtests.py --fast --no-pkgroot --staticfiles {posargs}
|
|
deps =
|
|
django
|
|
-rrequirements/requirements-testing.txt
|
|
-rrequirements/requirements-optionals.txt
|
|
|
|
[testenv:lint]
|
|
commands = ./runtests.py --lintonly
|
|
deps =
|
|
-rrequirements/requirements-codestyle.txt
|
|
-rrequirements/requirements-testing.txt
|
|
|
|
[testenv:docs]
|
|
skip_install = true
|
|
commands = mkdocs build
|
|
deps =
|
|
-rrequirements/requirements-testing.txt
|
|
-rrequirements/requirements-documentation.txt
|