diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-15 15:46:29 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-05-15 15:46:29 -0400 |
| commit | cfb0f9ca14f82c9ba06c4d5cbc992f821eb2234e (patch) | |
| tree | c3609c16161619b0405873b60632972f7fa4b568 /test/dialect | |
| parent | f574bcf98de0d30f0a28bf82aae84098157de0f4 (diff) | |
| download | sqlalchemy-cfb0f9ca14f82c9ba06c4d5cbc992f821eb2234e.tar.gz | |
Regression from this ticket caused the unsupported keyword
"true" to render, added logic to convert this to 1/0
for SQL server.
[ticket:2682]
Diffstat (limited to 'test/dialect')
| -rw-r--r-- | test/dialect/test_mssql.py | 11 | ||||
| -rw-r--r-- | test/dialect/test_oracle.py | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/dialect/test_mssql.py b/test/dialect/test_mssql.py index f1cd3fe85..7b8f53390 100644 --- a/test/dialect/test_mssql.py +++ b/test/dialect/test_mssql.py @@ -17,10 +17,21 @@ from sqlalchemy.testing import emits_warning_on, assert_raises_message import decimal from sqlalchemy.engine.reflection import Inspector from sqlalchemy.util.compat import b +from sqlalchemy import sql + class CompileTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = mssql.dialect() + def test_true_false(self): + self.assert_compile( + sql.false(), "0" + ) + self.assert_compile( + sql.true(), + "1" + ) + def test_select(self): t = table('sometable', column('somecolumn')) self.assert_compile(t.select(), diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py index 861b28c5f..def4654f0 100644 --- a/test/dialect/test_oracle.py +++ b/test/dialect/test_oracle.py @@ -15,6 +15,7 @@ import decimal from sqlalchemy.testing.schema import Table, Column import datetime import os +from sqlalchemy import sql class OutParamTest(fixtures.TestBase, AssertsExecutionResults): @@ -106,6 +107,15 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = oracle.dialect() + def test_true_false(self): + self.assert_compile( + sql.false(), "0" + ) + self.assert_compile( + sql.true(), + "1" + ) + def test_owner(self): meta = MetaData() parent = Table('parent', meta, Column('id', Integer, |
