MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _expect_warnings_sqla_only

Function _expect_warnings_sqla_only

lib/sqlalchemy/testing/assertions.py:153–173  ·  view source on GitHub ↗

SQLAlchemy internal use only _expect_warnings(). Alembic is using _expect_warnings() directly, and should be updated to use this new interface.

(
    exc_cls,
    messages,
    regex=True,
    search_msg=False,
    assert_=True,
)

Source from the content-addressed store, hash-verified

151
152
153def _expect_warnings_sqla_only(
154 exc_cls,
155 messages,
156 regex=True,
157 search_msg=False,
158 assert_=True,
159):
160 """SQLAlchemy internal use only _expect_warnings().
161
162 Alembic is using _expect_warnings() directly, and should be updated
163 to use this new interface.
164
165 """
166 return _expect_warnings(
167 exc_cls,
168 messages,
169 regex=regex,
170 search_msg=search_msg,
171 assert_=assert_,
172 raise_on_any_unexpected=True,
173 )
174
175
176@contextlib.contextmanager

Callers 5

expect_warningsFunction · 0.85
expect_deprecatedFunction · 0.85
expect_deprecated_20Function · 0.85
assert_warnsFunction · 0.85
assert_warns_messageFunction · 0.85

Calls 1

_expect_warningsFunction · 0.85

Tested by

no test coverage detected