summaryrefslogtreecommitdiff
path: root/test/sql/select.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-12-23 01:22:54 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-12-23 01:22:54 +0000
commit6cf4db7df37e56b700e363b66ab82f5921d1434b (patch)
treeff08404f209a75e1afcc9c17a0463c8f0c501d76 /test/sql/select.py
parent886ddcd12db97984cdb1cc94b9abaee5df4eb6d5 (diff)
downloadsqlalchemy-6cf4db7df37e56b700e363b66ab82f5921d1434b.tar.gz
- Columns can again contain percent signs within their
names. [ticket:1256]
Diffstat (limited to 'test/sql/select.py')
-rw-r--r--test/sql/select.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/sql/select.py b/test/sql/select.py
index 12c8524cf..ea9f27cdf 100644
--- a/test/sql/select.py
+++ b/test/sql/select.py
@@ -835,6 +835,20 @@ FROM mytable, myothertable WHERE foo.id = foofoo(lala) AND datetime(foo) = Today
"SELECT concat(:param_1, :param_2) "
"COLLATE somecol AS x")
+ def test_percent_chars(self):
+ t = table("table",
+ column("percent%"),
+ column("%(oneofthese)s"),
+ column("spaces % more spaces"),
+ )
+ self.assert_compile(
+ t.select(use_labels=True),
+ '''SELECT "table"."percent%" AS "table_percent%", '''\
+ '''"table"."%(oneofthese)s" AS "table_%(oneofthese)s", '''\
+ '''"table"."spaces % more spaces" AS "table_spaces % more spaces" FROM "table"'''
+ )
+
+
def test_joins(self):
self.assert_compile(
join(table2, table1, table1.c.myid == table2.c.otherid).select(),