Merge "Disable displaying warnings in functional tests"

This commit is contained in:
Zuul 2018-12-19 21:30:36 +00:00 committed by Gerrit Code Review
commit 3a3cc219b2
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,7 @@
# under the License.
import os
import warnings
from oslo_config import cfg
@ -31,6 +32,10 @@ DEFAULT_LOG_DIR = os.path.join(helpers.get_test_log_path(),
class BaseLoggingTestCase(base.BaseTestCase):
def setUp(self):
super(BaseLoggingTestCase, self).setUp()
# NOTE(slaweq): Because of issue with stestr and Python3, we need
# to avoid too much output to be produced during tests, so we will
# ignore python warnings here
warnings.simplefilter("ignore")
base.setup_test_logging(
cfg.CONF, DEFAULT_LOG_DIR, "%s.txt" % self.id())

View File

@ -49,6 +49,9 @@ setenv = {[testenv]setenv}
{[testenv:common]setenv}
OS_TEST_PATH=./neutron/tests/functional
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
# Because of issue with stestr and Python3, we need to avoid too much output
# to be produced during tests, so we will ignore python warnings here
PYTHONWARNINGS=ignore
deps =
{[testenv]deps}
-r{toxinidir}/neutron/tests/functional/requirements.txt