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
1 changed files with 3 additions and 0 deletions

View File

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