summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/warnings.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/warnings.py')
-rw-r--r--lib/sqlalchemy/testing/warnings.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/warnings.py b/lib/sqlalchemy/testing/warnings.py
index db36a2891..db8379049 100644
--- a/lib/sqlalchemy/testing/warnings.py
+++ b/lib/sqlalchemy/testing/warnings.py
@@ -28,9 +28,13 @@ def setup_filters():
as we need to delay importing SQLAlchemy until conftest.py has been
processed.
+ NOTE: filters on subclasses of DeprecationWarning or
+ PendingDeprecationWarning have no effect if added here, since pytest
+ will add at each test the following filters
+ ``always::PendingDeprecationWarning`` and ``always::DeprecationWarning``
+ that will take precedence over any added here.
+
"""
- warnings.filterwarnings("ignore", category=exc.SAPendingDeprecationWarning)
- warnings.filterwarnings("error", category=exc.SADeprecationWarning)
warnings.filterwarnings("error", category=exc.SAWarning)
warnings.filterwarnings("always", category=exc.SATestSuiteWarning)