From 6a48760faf64a99752f18a06eaf42cc0b217ef52 Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Tue, 9 Aug 2016 20:02:00 -0400 Subject: [PATCH] Enable DeprecationWarning in test environments Many deprecations are triggered early (on imports, for example) before the warnings are enabled by the WarningsFixture in the base test class. To make sure all DeprecationWarning messages are emitted we enable them via the PYTHONWARNINGS environment variable. Change-Id: I5084e0ee77f9d84c3110974343b823cb5c78d98f --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 54fdd6a..1333b9e 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ usedevelop = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} + PYTHONWARNINGS=default::DeprecationWarning deps = -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}'