@contextlib.contextmanager
def expect_warnings_on(db, *messages, **kw):
    'Context manager which expects one or more warnings on specific\n    dialects.\n\n    The expect version **asserts** that the warnings were in fact seen.\n\n    '
    spec = db_spec(db)
    if (isinstance(db, util.string_types) and (not spec(config._current))):
        (yield)
    else:
        with expect_warnings(*messages, **kw):
            (yield)
Context manager which expects one or more warnings on specific
dialects.

The expect version **asserts** that the warnings were in fact seen.
@contextlib.contextmanager
def expect_warnings_on(db, *messages, **kw):
    'Context manager which expects one or more warnings on specific\n    dialects.\n\n    The expect version **asserts** that the warnings were in fact seen.\n\n    '
    spec = db_spec(db)
    if (isinstance(db, util.string_types) and (not spec(config._current))):
        (yield)
    else:
        with expect_warnings(*messages, **kw):
            (yield)