]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support warnings in exclusions
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Oct 2025 21:19:26 +0000 (17:19 -0400)
committerMichael Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Oct 2025 23:07:32 +0000 (23:07 +0000)
commit4608229fbc5ca72134331adde351411b0ec21339
tree6e517fa3e17a62db10f7d8f7d70b380f274f3c43
parent2c7b26d8a6ece7292e0d88fe3145ada73deb115a
Support warnings in exclusions

this adds a new feature to exclusions ``warns_if()`` which applies
the expect_warnings() context manager to a test method.  Additionally,
at the class level these requirements can be extracted from a
``__requirements__`` directive and also added to global Python warnings
filter using catch_warnings().

Change-Id: Ibe28d169106309a930731c77e201402152a38810
(cherry picked from commit 1a2d5cb8518e0b2ce81b2368e16fb470c27389be)
lib/sqlalchemy/testing/exclusions.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/plugin/pytestplugin.py