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

11
tox.ini
View File

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