-
-
Notifications
You must be signed in to change notification settings - Fork 7k
tests: cover and fix handling of optionals #6041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Increases coverage like expected: https://codecov.io/gh/encode/django-rest-framework/pull/6041 (+0.15%). |
Hm. On the one hand, testing the optional requirements is The Correct Thing To Do TM. On the other, optionals would now only be tested against one version of python. Maybe we should test the inverse? eg, a |
Agreed. diff --git i/tox.ini w/tox.ini
index 5749fd6c..49e27b0d 100644
--- i/tox.ini
+++ w/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] |
Pushed a squash-up (for the first commit really, unlike it currently says). OTOH build time likely is better with base-by-default.. ;) |
You could also have pushed fixups to this PR - would have helped to keep discussion/review in one place. |
Oh, "Allow edits from maintainers." was not ticked (but have done so now). |
Taken out of #6038.