Skip to content

Commit a5b59c7

Browse files
committed
Make tests fail on warnings
This is a technique I've rolled out against my own open source projects and [Django REST Framework](encode/django-rest-framework#7586). By failing tests as soon as new deprecation warnings are created in the library, they aren't passed on to users who then have to report them back in issues like django-import-export#1195, saving everyone some time, effort, and noise.
1 parent 691baad commit a5b59c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ envlist =
88
{py36,py37,py38}-djangomaster-tablib{dev,stable},
99

1010
[testenv]
11-
commands = python {toxinidir}/tests/manage.py test core
11+
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning {toxinidir}/tests/manage.py test core
1212
deps =
1313
tablibdev: -egit+https://github.com/jazzband/tablib.git#egg=tablib
1414
tablibstable: tablib

0 commit comments

Comments
 (0)