summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing')
-rw-r--r--lib/sqlalchemy/testing/suite/test_sequence.py4
-rw-r--r--lib/sqlalchemy/testing/warnings.py8
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_sequence.py b/lib/sqlalchemy/testing/suite/test_sequence.py
index 53398ea31..eae051992 100644
--- a/lib/sqlalchemy/testing/suite/test_sequence.py
+++ b/lib/sqlalchemy/testing/suite/test_sequence.py
@@ -88,7 +88,7 @@ class SequenceTest(fixtures.TablesTest):
)
def test_nextval_direct(self, connection):
- r = connection.execute(self.tables.seq_pk.c.id.default)
+ r = connection.scalar(self.tables.seq_pk.c.id.default)
eq_(r, testing.db.dialect.default_sequence_base)
@requirements.sequences_optional
@@ -139,7 +139,7 @@ class SequenceTest(fixtures.TablesTest):
schema_translate_map={"alt_schema": config.test_schema}
)
- r = connection.execute(seq)
+ r = connection.scalar(seq)
eq_(r, testing.db.dialect.default_sequence_base)
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)