diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-24 11:33:53 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-24 11:33:53 -0400 |
commit | 2f150bee28525d49e7f36d2e0c7fbeda2352bc3a (patch) | |
tree | 677058b86afae6dd11308d21e71d170e0b0673b4 /test/sql/test_quote.py | |
parent | 87d7076b49ec52d6f890d1dc56f61ea2eb83f3a6 (diff) | |
download | sqlalchemy-2f150bee28525d49e7f36d2e0c7fbeda2352bc3a.tar.gz |
- rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging
Diffstat (limited to 'test/sql/test_quote.py')
-rw-r--r-- | test/sql/test_quote.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/test/sql/test_quote.py b/test/sql/test_quote.py index 3cab3dc79..76a789242 100644 --- a/test/sql/test_quote.py +++ b/test/sql/test_quote.py @@ -6,8 +6,8 @@ from sqlalchemy import testing from sqlalchemy.sql.elements import quoted_name, _truncated_label, _anonymous_label from sqlalchemy.testing.util import picklers -class QuoteTest(fixtures.TestBase, AssertsCompiledSQL): - __dialect__ = 'default' +class QuoteExecTest(fixtures.TestBase): + __backend__ = True @classmethod def setup_class(cls): @@ -159,6 +159,28 @@ class QuoteTest(fixtures.TestBase, AssertsCompiledSQL): result = select(columns, use_labels=True).execute().fetchall() assert(result == [(1, 2, 3), (2, 2, 3), (4, 3, 2)]) +class QuoteTest(fixtures.TestBase, AssertsCompiledSQL): + __dialect__ = 'default' + + @classmethod + def setup_class(cls): + # TODO: figure out which databases/which identifiers allow special + # characters to be used, such as: spaces, quote characters, + # punctuation characters, set up tests for those as well. + + global table1, table2 + metadata = MetaData(testing.db) + + table1 = Table('WorstCase1', metadata, + Column('lowercase', Integer, primary_key=True), + Column('UPPERCASE', Integer), + Column('MixedCase', Integer), + Column('ASC', Integer, key='a123')) + table2 = Table('WorstCase2', metadata, + Column('desc', Integer, primary_key=True, key='d123'), + Column('Union', Integer, key='u123'), + Column('MixedCase', Integer)) + @testing.crashes('oracle', 'FIXME: unknown, verify not fails_on') @testing.requires.subqueries def test_labels(self): @@ -181,7 +203,6 @@ class QuoteTest(fixtures.TestBase, AssertsCompiledSQL): where the "UPPERCASE" column of "LaLa" doesn't exist. """ - x = table1.select(distinct=True).alias('LaLa').select().scalar() self.assert_compile( table1.select(distinct=True).alias('LaLa').select(), 'SELECT ' |