squash! tests: fix skipping of tests without coreapi/coreschema

Use "base" instead of "optionals" factor.
This commit is contained in:
Daniel Hahler 2018-06-21 21:51:01 +02:00
parent 6b3af89b90
commit 75a4f61835
2 changed files with 8 additions and 7 deletions

View File

@ -22,7 +22,7 @@ matrix:
- { python: "3.6", env: DJANGO=1.11 }
- { python: "3.6", env: DJANGO=2.0 }
- { python: "3.6", env: DJANGO=2.0 }
- { python: "3.6", env: TOXENV=py36-django20-optionals }
- { python: "3.6", env: TOXENV=py36-django20-base }
- { python: "3.6", env: DJANGO=2.1 }
- { python: "2.7", env: TOXENV=lint }
- { python: "2.7", env: TOXENV=docs }
@ -35,7 +35,7 @@ matrix:
- tox # test sdist
- python: "3.6"
env: TOXENV=dist-optionals
env: TOXENV=dist-base
script:
- python setup.py bdist_wheel
- tox --installpkg ./dist/djangorestframework-*.whl

11
tox.ini
View File

@ -21,24 +21,25 @@ envdir = {toxworkdir}/venvs/{envname}
setenv =
PYTHONDONTWRITEBYTECODE=1
PYTHONWARNINGS=once
base: _DRF_TESTS_OPTIONAL_DEPS=
deps =
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1b1,<2.2
djangomaster: https://github.com/django/django/archive/master.tar.gz
optionals: -rrequirements/requirements-optionals.txt
{env:_DRF_TESTS_OPTIONAL_DEPS:-rrequirements/requirements-optionals.txt}
-rrequirements/requirements-testing.txt
[testenv:dist]
[testenv:dist-base]
commands = ./runtests.py --fast {posargs} --no-pkgroot --staticfiles -rw
deps =
django
-rrequirements/requirements-testing.txt
[testenv:dist-optionals]
commands = {[testenv:dist]commands}
deps = {[testenv:dist]deps}
[testenv:dist]
commands = {[testenv:dist-base]commands}
deps = {[testenv:dist-base]deps}
-rrequirements/requirements-optionals.txt
[testenv:lint]