summaryrefslogtreecommitdiff
path: root/test/sql/test_identity_column.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-12-01 23:47:13 +0100
committerFederico Caselli <cfederico87@gmail.com>2020-12-01 23:49:17 +0100
commit302e18eb75f29e651e67b18033487e40758d7c83 (patch)
tree1e3fb8a26f0956f0384f80033e7a9f3d38370e88 /test/sql/test_identity_column.py
parent14c08d18885e16611b884bd76ba2811375de1731 (diff)
downloadsqlalchemy-302e18eb75f29e651e67b18033487e40758d7c83.tar.gz
Properly render ``cycle=False`` and ``order=False``
These get rendered as ``NO CYCLE`` and ``NO ORDER`` in :class:`_sql.Sequence` and :class:`_sql.Identity` objects. Fixes: #5738 Change-Id: Ia9ccb5481a104cb32d3b517e99efd5e730c84946
Diffstat (limited to 'test/sql/test_identity_column.py')
-rw-r--r--test/sql/test_identity_column.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/sql/test_identity_column.py b/test/sql/test_identity_column.py
index f99054d62..3ac97db92 100644
--- a/test/sql/test_identity_column.py
+++ b/test/sql/test_identity_column.py
@@ -55,16 +55,21 @@ class _IdentityDDLFixture(testing.AssertsCompiledSQL):
dict(always=False, cache=1000, order=True),
"BY DEFAULT AS IDENTITY (CACHE 1000 ORDER)",
),
- (dict(order=True), "BY DEFAULT AS IDENTITY (ORDER)"),
+ (dict(order=True, cycle=True), "BY DEFAULT AS IDENTITY (ORDER CYCLE)"),
+ (
+ dict(order=False, cycle=False),
+ "BY DEFAULT AS IDENTITY (NO ORDER NO CYCLE)",
+ ),
)
def test_create_ddl(self, identity_args, text):
if getattr(self, "__dialect__", None) != "default" and testing.against(
"oracle"
):
- text = text.replace("NO MINVALUE", "NOMINVALUE").replace(
- "NO MAXVALUE", "NOMAXVALUE"
- )
+ text = text.replace("NO MINVALUE", "NOMINVALUE")
+ text = text.replace("NO MAXVALUE", "NOMAXVALUE")
+ text = text.replace("NO CYCLE", "NOCYCLE")
+ text = text.replace("NO ORDER", "NOORDER")
t = Table(
"foo_table",