diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
commit | dd5f9c2039731adb6c019c4cc3a39694f9b236ad (patch) | |
tree | ce80dd61476c0c09f792f5690c7c7434b7876cc7 /lib/sqlalchemy/testing/assertions.py | |
parent | f3c93170dcbe705da25bc18bad2b29620d82a490 (diff) | |
parent | 01c50c64e302c193733cef7fb146fbab8eaa44bd (diff) | |
download | sqlalchemy-dd5f9c2039731adb6c019c4cc3a39694f9b236ad.tar.gz |
Merge "Remove all remaining removed_in_20 warnings slated for removal" into main
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r-- | lib/sqlalchemy/testing/assertions.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py index 795b53804..978e6764f 100644 --- a/lib/sqlalchemy/testing/assertions.py +++ b/lib/sqlalchemy/testing/assertions.py @@ -31,7 +31,7 @@ from ..util import decorator def expect_warnings(*messages, **kw): """Context manager which expects one or more warnings. - With no arguments, squelches all SAWarning and RemovedIn20Warning emitted via + With no arguments, squelches all SAWarning emitted via sqlalchemy.util.warn and sqlalchemy.util.warn_limited. Otherwise pass string expressions that will match selected warnings via regex; all non-matching warnings are sent through. @@ -41,9 +41,7 @@ def expect_warnings(*messages, **kw): Note that the test suite sets SAWarning warnings to raise exceptions. """ # noqa - return _expect_warnings( - (sa_exc.RemovedIn20Warning, sa_exc.SAWarning), messages, **kw - ) + return _expect_warnings(sa_exc.SAWarning, messages, **kw) @contextlib.contextmanager @@ -199,9 +197,7 @@ def _expect_warnings( else: real_warn(msg, *arg, **kw) - with mock.patch("warnings.warn", our_warn), mock.patch( - "sqlalchemy.util.SQLALCHEMY_WARN_20", True - ), mock.patch("sqlalchemy.util.deprecations.SQLALCHEMY_WARN_20", True): + with mock.patch("warnings.warn", our_warn): try: yield finally: |