diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-11 11:24:54 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-11 11:24:54 -0500 |
| commit | 33eae4a1405b1968ad486bfe3aefee7f7d631128 (patch) | |
| tree | 326624218607f1f91ddcccdc61d83dec99251c15 /test/sql | |
| parent | 09efc11fbc95f8a47200dd102d304b90609e9408 (diff) | |
| download | sqlalchemy-33eae4a1405b1968ad486bfe3aefee7f7d631128.tar.gz | |
make it more explicit in tests which dialect we want to use for things
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_case_statement.py | 1 | ||||
| -rw-r--r-- | test/sql/test_compiler.py | 7 | ||||
| -rw-r--r-- | test/sql/test_constraints.py | 1 | ||||
| -rw-r--r-- | test/sql/test_functions.py | 1 | ||||
| -rw-r--r-- | test/sql/test_generative.py | 10 | ||||
| -rw-r--r-- | test/sql/test_quote.py | 2 | ||||
| -rw-r--r-- | test/sql/test_types.py | 5 |
7 files changed, 26 insertions, 1 deletions
diff --git a/test/sql/test_case_statement.py b/test/sql/test_case_statement.py index 97220d4dd..4bb9cf0fc 100644 --- a/test/sql/test_case_statement.py +++ b/test/sql/test_case_statement.py @@ -7,6 +7,7 @@ from sqlalchemy.sql import table, column class CaseTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' @classmethod def setup_class(cls): diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 4ede56320..b060fef5b 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -62,6 +62,7 @@ addresses = table('addresses', ) class SelectTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' def test_attribute_sanity(self): assert hasattr(table1, 'c') @@ -2417,6 +2418,8 @@ class SelectTest(TestBase, AssertsCompiledSQL): class CRUDTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + def test_insert(self): # generic insert, will create bind params for all columns self.assert_compile(insert(table1), @@ -2671,6 +2674,8 @@ class CRUDTest(TestBase, AssertsCompiledSQL): ) class InlineDefaultTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + def test_insert(self): m = MetaData() foo = Table('foo', m, @@ -2703,6 +2708,8 @@ class InlineDefaultTest(TestBase, AssertsCompiledSQL): "col3=:col3") class SchemaTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + def test_select(self): self.assert_compile(table4.select(), "SELECT remote_owner.remotetable.rem_id, remote_owner.remotetable.datatype_id," diff --git a/test/sql/test_constraints.py b/test/sql/test_constraints.py index f4791c0bd..1c13a0ec7 100644 --- a/test/sql/test_constraints.py +++ b/test/sql/test_constraints.py @@ -256,6 +256,7 @@ class ConstraintTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): ) class ConstraintCompilationTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' def _test_deferrable(self, constraint_factory): t = Table('tbl', MetaData(), diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index b0106b21b..98d8d7a97 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -16,6 +16,7 @@ from sqlalchemy.databases import * class CompileTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' def test_compile(self): for dialect in all_dialects(exclude=('sybase', 'access', 'informix', 'maxdb')): diff --git a/test/sql/test_generative.py b/test/sql/test_generative.py index c6f5dc05e..088162c8a 100644 --- a/test/sql/test_generative.py +++ b/test/sql/test_generative.py @@ -169,6 +169,8 @@ class TraversalTest(TestBase, AssertsExecutionResults): class ClauseTest(TestBase, AssertsCompiledSQL): """test copy-in-place behavior of various ClauseElements.""" + __dialect__ = 'default' + @classmethod def setup_class(cls): global t1, t2 @@ -471,6 +473,8 @@ class ClauseTest(TestBase, AssertsCompiledSQL): 'anon_1.col1') class ClauseAdapterTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + @classmethod def setup_class(cls): global t1, t2 @@ -858,6 +862,8 @@ class ClauseAdapterTest(TestBase, AssertsCompiledSQL): ) class SpliceJoinsTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + @classmethod def setup_class(cls): global table1, table2, table3, table4 @@ -929,6 +935,8 @@ class SpliceJoinsTest(TestBase, AssertsCompiledSQL): class SelectTest(TestBase, AssertsCompiledSQL): """tests the generative capability of Select""" + __dialect__ = 'default' + @classmethod def setup_class(cls): global t1, t2 @@ -1083,6 +1091,8 @@ class SelectTest(TestBase, AssertsCompiledSQL): class InsertTest(TestBase, AssertsCompiledSQL): """Tests the generative capability of Insert""" + __dialect__ = 'default' + # fixme: consolidate converage from elsewhere here and expand @classmethod diff --git a/test/sql/test_quote.py b/test/sql/test_quote.py index 2aa5086c6..50adad751 100644 --- a/test/sql/test_quote.py +++ b/test/sql/test_quote.py @@ -4,6 +4,8 @@ from sqlalchemy.sql import compiler from test.lib import * class QuoteTest(TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + @classmethod def setup_class(cls): # TODO: figure out which databases/which identifiers allow special diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 52db03d76..226283195 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -873,6 +873,8 @@ class BinaryTest(TestBase, AssertsExecutionResults): return open(f, mode='rb').read() class ExpressionTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): + __dialect__ = 'default' + @classmethod def setup_class(cls): global test_table, meta, MyCustomType, MyTypeDec @@ -1153,7 +1155,8 @@ class CompileTest(TestBase, AssertsCompiledSQL): (INTEGER(), "INTEGER"), (dialects.mysql.INTEGER(display_width=5), "INTEGER(5)") ): - self.assert_compile(type_, expected) + self.assert_compile(type_, expected, + allow_dialect_select=True) class DateTest(TestBase, AssertsExecutionResults): @classmethod |
