summaryrefslogtreecommitdiff
path: root/test/sql/quote.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql/quote.py')
-rw-r--r--test/sql/quote.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sql/quote.py b/test/sql/quote.py
index 607a595d3..403ae2d42 100644
--- a/test/sql/quote.py
+++ b/test/sql/quote.py
@@ -97,10 +97,16 @@ class QuoteTest(PersistTest):
x = select([table.c.col1.label("ImATable_col1")]).alias("SomeAlias")
assert str(select([x.c.ImATable_col1])) == '''SELECT "SomeAlias"."ImATable_col1" \nFROM (SELECT "ImATable".col1 AS "ImATable_col1" \nFROM "ImATable") AS "SomeAlias"'''
+ # note that 'foo' and 'FooCol' are literals already quoted
x = select([sql.column("'foo'").label("somelabel")], from_obj=[table]).alias("AnAlias")
x = x.select()
+ #print x
assert str(x) == '''SELECT "AnAlias".somelabel \nFROM (SELECT 'foo' AS somelabel \nFROM "ImATable") AS "AnAlias"'''
+ x = select([sql.column("'FooCol'").label("SomeLabel")], from_obj=[table])
+ x = x.select()
+ assert str(x) == '''SELECT "SomeLabel" \nFROM (SELECT 'FooCol' AS "SomeLabel" \nFROM "ImATable")'''
+
def testlabelsnocase(self):
metadata = MetaData()
table1 = Table('SomeCase1', metadata,