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
This commit is contained in:
Li Wei 2016-09-30 17:07:06 +08:00 committed by liwei
parent 7ab405a97b
commit e40d3fff1d
1 changed files with 3 additions and 1 deletions

View File

@ -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