Merge "Ignore SQLAlchemy RemovedIn20Warning"

This commit is contained in:
Zuul 2020-03-05 01:58:19 +00:00 committed by Gerrit Code Review
commit 8533b7dbd7

View File

@ -684,6 +684,9 @@ class BaseTestCase(testtools.TestCase):
warnings.filterwarnings('error', category=DeprecationWarning, warnings.filterwarnings('error', category=DeprecationWarning,
module='^keystone\\.') module='^keystone\\.')
warnings.simplefilter('error', exc.SAWarning) warnings.simplefilter('error', exc.SAWarning)
if hasattr(exc, "RemovedIn20Warning"):
warnings.simplefilter('ignore', exc.RemovedIn20Warning)
self.addCleanup(warnings.resetwarnings) self.addCleanup(warnings.resetwarnings)
# Ensure we have an empty threadlocal context at the start of each # Ensure we have an empty threadlocal context at the start of each
# test. # test.