From e40d3fff1d27768bb8895cadcdb93c807f362774 Mon Sep 17 00:00:00 2001 From: Li Wei Date: Fri, 30 Sep 2016 17:07:06 +0800 Subject: [PATCH] Add 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. This copy from 1be35ff039d67c50866f2556ef847b048cbf3578 Change-Id: I25e51e8365e154489d6513db7a5dd05914a3b221 --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 193ccc0949..2cd69e946d 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,9 @@ envlist = py34,py27,pep8 skipsdist = True [testenv] -setenv = VIRTUAL_ENV={envdir} +setenv = + VIRTUAL_ENV={envdir} + PYTHONWARNINGS=default::DeprecationWarning usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} deps = -r{toxinidir}/test-requirements.txt