diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-04-04 10:22:32 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@awstats.zzzcomputing.com> | 2017-04-04 10:22:32 -0400 |
| commit | b4686a0f7864715fdce7c781bafc29da2e91073b (patch) | |
| tree | 2d1c1eeaf6b594399630030e81cf8513b0df49de /test | |
| parent | e28c3c7ec0d74cb0c5cc444cec999a7515656869 (diff) | |
| parent | 4a4b17e0d3a154094858e73ed1e32c5733047de8 (diff) | |
| download | sqlalchemy-b4686a0f7864715fdce7c781bafc29da2e91073b.tar.gz | |
Merge "Apply SQL compilation to sqltext for column-level CHECK constraint"
Diffstat (limited to 'test')
| -rw-r--r-- | test/sql/test_constraints.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sql/test_constraints.py b/test/sql/test_constraints.py index aebbb4c30..3365b3cf0 100644 --- a/test/sql/test_constraints.py +++ b/test/sql/test_constraints.py @@ -1137,6 +1137,19 @@ class ConstraintCompilationTest(fixtures.TestBase, AssertsCompiledSQL): "ALTER TABLE tbl ADD CHECK (a > 5)" ) + def test_render_check_constraint_inline_sql_literal(self): + t, t2 = self._constraint_create_fixture() + + m = MetaData() + t = Table( + 't', m, + Column('a', Integer, CheckConstraint(Column('a', Integer) > 5))) + + self.assert_compile( + schema.CreateColumn(t.c.a), + "a INTEGER CHECK (a > 5)" + ) + def test_render_index_sql_literal(self): t, t2 = self._constraint_create_fixture() |
