]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Fix expect_warnings_on function
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 6 Jan 2019 18:06:56 +0000 (13:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 6 Jan 2019 18:06:56 +0000 (13:06 -0500)
This function is not used in Alembic right now but it contained
undefined symbols, re-copy over from SQLAlchemy.

Change-Id: I3eb6eb76dc1d0d83606fa2a4af88300ee802d3bf

alembic/testing/assertions.py

index 4fb43a4fae07c0f7be4a76f749cd5da351c09e79..2c7382c2997498dd102cc98cbee0738316ced55a 100644 (file)
@@ -10,6 +10,8 @@ from sqlalchemy.util import decorator
 from sqlalchemy import exc as sa_exc
 import warnings
 from . import mock
+from .exclusions import db_spec
+from . import config
 
 
 if not util.sqla_094:
@@ -127,8 +129,6 @@ def expect_warnings_on(db, *messages, **kw):
 
     if isinstance(db, util.string_types) and not spec(config._current):
         yield
-    elif not _is_excluded(*db):
-        yield
     else:
         with expect_warnings(*messages, **kw):
             yield