]> 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)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 14 Oct 2025 21:19:26 +0000 (17:19 -0400)
commit1a2d5cb8518e0b2ce81b2368e16fb470c27389be
tree1bbc83681a82b3c1c26ea9967081d6561142fa8b
parent52bbb8130be3dd8f194e6fba4755ce5a1f7b9ad9
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
lib/sqlalchemy/testing/exclusions.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/plugin/pytestplugin.py