summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql')
-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(),