diff options
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index aa355549b..6196b52f2 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -1,6 +1,7 @@ # coding: utf-8 from sqlalchemy import and_ +from sqlalchemy import BigInteger from sqlalchemy import cast from sqlalchemy import Column from sqlalchemy import Computed @@ -16,6 +17,7 @@ from sqlalchemy import null from sqlalchemy import schema from sqlalchemy import select from sqlalchemy import Sequence +from sqlalchemy import SmallInteger from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import testing @@ -93,6 +95,20 @@ class SequenceTest(fixtures.TestBase, AssertsCompiledSQL): r = conn.execute(t.insert()) eq_(r.inserted_primary_key, (1,)) + @testing.combinations( + (None, ""), + (Integer, "AS INTEGER "), + (SmallInteger, "AS SMALLINT "), + (BigInteger, "AS BIGINT "), + ) + def test_create_index_concurrently(self, type_, text): + s = Sequence("s1", data_type=type_) + self.assert_compile( + schema.CreateSequence(s), + "CREATE SEQUENCE s1 %sSTART WITH 1" % text, + dialect=postgresql.dialect(), + ) + class CompileTest(fixtures.TestBase, AssertsCompiledSQL): |