diff options
| author | Jason Kirtland <jek@discorporate.us> | 2008-05-14 22:09:23 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2008-05-14 22:09:23 +0000 |
| commit | dd20ca5cb9eb0361f22023437d25a5bbb53f6871 (patch) | |
| tree | f033f05e3a273456d7e6100ce1897ba89849168f /test/sql/quote.py | |
| parent | b2504db4f72e64981f27b796fcfd50c3c07fd606 (diff) | |
| download | sqlalchemy-dd20ca5cb9eb0361f22023437d25a5bbb53f6871.tar.gz | |
- Removed @unsupported
Diffstat (limited to 'test/sql/quote.py')
| -rw-r--r-- | test/sql/quote.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/test/sql/quote.py b/test/sql/quote.py index 2e5910c7b..7003ce834 100644 --- a/test/sql/quote.py +++ b/test/sql/quote.py @@ -4,11 +4,12 @@ from sqlalchemy import sql from sqlalchemy.sql import compiler from testlib import * + class QuoteTest(TestBase, AssertsCompiledSQL): def setUpAll(self): - # 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. + # 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, table3 metadata = MetaData(testing.db) table1 = Table('WorstCase1', metadata, @@ -67,24 +68,24 @@ class QuoteTest(TestBase, AssertsCompiledSQL): res2 = select([table2.c.d123, table2.c.u123, table2.c.MixedCase], use_labels=True).execute().fetchall() print res2 assert(res2==[(1,2,3),(2,2,3),(4,3,2)]) - + def test_quote_flag(self): metadata = MetaData() - t1 = Table('TableOne', metadata, + t1 = Table('TableOne', metadata, Column('ColumnOne', Integer), schema="FooBar") self.assert_compile(t1.select(), '''SELECT "FooBar"."TableOne"."ColumnOne" FROM "FooBar"."TableOne"''') metadata = MetaData() - t1 = Table('t1', metadata, + t1 = Table('t1', metadata, Column('col1', Integer, quote=True), quote=True, schema="foo", quote_schema=True) self.assert_compile(t1.select(), '''SELECT "foo"."t1"."col1" FROM "foo"."t1"''') metadata = MetaData() - t1 = Table('TableOne', metadata, + t1 = Table('TableOne', metadata, Column('ColumnOne', Integer, quote=False), quote=False, schema="FooBar", quote_schema=False) self.assert_compile(t1.select(), '''SELECT FooBar.TableOne.ColumnOne FROM FooBar.TableOne''') - - @testing.unsupported('oracle', 'FIXME: unknown, verify not fails_on') + + @testing.crashes('oracle', 'FIXME: unknown, verify not fails_on') @testing.requires.subqueries def testlabels(self): """test the quoting of labels. @@ -109,12 +110,12 @@ class QuoteTest(TestBase, AssertsCompiledSQL): # note that 'foo' and 'FooCol' are literals already quoted x = select([sql.literal_column("'foo'").label("somelabel")], from_obj=[table]).alias("AnAlias") x = x.select() - self.assert_compile(x, + self.assert_compile(x, '''SELECT "AnAlias".somelabel FROM (SELECT 'foo' AS somelabel FROM "ImATable") AS "AnAlias"''') x = select([sql.literal_column("'FooCol'").label("SomeLabel")], from_obj=[table]) x = x.select() - self.assert_compile(x, + self.assert_compile(x, '''SELECT "SomeLabel" FROM (SELECT 'FooCol' AS "SomeLabel" FROM "ImATable")''') |
