summaryrefslogtreecommitdiff
path: root/test/sql/test_case_statement.py
diff options
context:
space:
mode:
authorTony Locke <tlocke@tlocke.org.uk>2014-06-23 20:45:16 +0100
committerTony Locke <tlocke@tlocke.org.uk>2014-07-06 23:13:44 +0100
commit73d00339c4f6424714f63470f053a749c319d899 (patch)
tree3e20abd8e3b4d995053184818adf6d3336dd8f4b /test/sql/test_case_statement.py
parent7c29cff14d8f3dd5ecfb39fdeb8d6a161333d722 (diff)
downloadsqlalchemy-73d00339c4f6424714f63470f053a749c319d899.tar.gz
pg8000 passing test/sql
Diffstat (limited to 'test/sql/test_case_statement.py')
-rw-r--r--test/sql/test_case_statement.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/sql/test_case_statement.py b/test/sql/test_case_statement.py
index 998a55cd8..2966fd9ba 100644
--- a/test/sql/test_case_statement.py
+++ b/test/sql/test_case_statement.py
@@ -73,14 +73,18 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL):
('gt3', 6, 'pk_6_data')
]
- w_else = select([case([
- [info_table.c.pk < 3,
- 3],
- [and_(info_table.c.pk >= 3, info_table.c.pk < 6),
- 6]],
- else_ = 0).label('x'),
- info_table.c.pk, info_table.c.info],
- from_obj=[info_table])
+ w_else = select(
+ [
+ case(
+ [
+ [info_table.c.pk < 3, cast(3, Integer)],
+ [
+ and_(
+ info_table.c.pk >= 3, info_table.c.pk < 6),
+ 6]],
+ else_ = 0).label('x'),
+ info_table.c.pk, info_table.c.info],
+ from_obj=[info_table])
else_result = w_else.execute().fetchall()