From 75a4f61835a8aa486a3ccaa359caead2dd48e55f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 21 Jun 2018 21:51:01 +0200 Subject: [PATCH] squash! tests: fix skipping of tests without coreapi/coreschema Use "base" instead of "optionals" factor. --- .travis.yml | 4 ++-- tox.ini | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16bdf2265..3834d3a27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tox.ini b/tox.ini index 5749fd6c7..49e27b0dd 100644 --- a/tox.ini +++ b/tox.ini @@ -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]