summaryrefslogtreecommitdiff
path: root/test/dialect/mssql/test_sequence.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/mssql/test_sequence.py')
-rw-r--r--test/dialect/mssql/test_sequence.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/dialect/mssql/test_sequence.py b/test/dialect/mssql/test_sequence.py
index 5afe9c075..c03607e7a 100644
--- a/test/dialect/mssql/test_sequence.py
+++ b/test/dialect/mssql/test_sequence.py
@@ -8,8 +8,10 @@ from sqlalchemy import select
from sqlalchemy import Sequence
from sqlalchemy import String
from sqlalchemy import Table
+from sqlalchemy.testing import config
from sqlalchemy.testing import eq_
from sqlalchemy.testing import fixtures
+from sqlalchemy.testing.provision import normalize_sequence
class SequenceTest(fixtures.TablesTest):
@@ -24,6 +26,18 @@ class SequenceTest(fixtures.TablesTest):
Column(
"id", Integer, default=Sequence("int_seq", data_type=Integer())
),
+ Column(
+ "id_provision",
+ Integer,
+ default=normalize_sequence(
+ config, Sequence("id_provision", data_type=Integer())
+ ),
+ ),
+ Column(
+ "id_start",
+ Integer,
+ default=Sequence("id_start", data_type=Integer(), start=42),
+ ),
Column("txt", String(50)),
)
@@ -56,8 +70,10 @@ class SequenceTest(fixtures.TablesTest):
def test_int_seq(self, connection):
t = self.tables.int_seq_t
connection.execute(t.insert().values({"txt": "int_seq test"}))
- result = connection.scalar(select(t.c.id))
- eq_(result, 1)
+ result = connection.execute(select(t)).first()
+ eq_(result.id, -(2**31))
+ eq_(result.id_provision, 1)
+ eq_(result.id_start, 42)
def test_bigint_seq(self, connection):
t = self.tables.bigint_seq_t