summaryrefslogtreecommitdiff
path: root/test/sql/test_case_statement.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-09-23 18:09:18 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-09-23 18:09:18 -0400
commit444abbe84722e52ff453542e65a6d8e2208cbc50 (patch)
tree9c6b5682614c1c5834cd13af8a0ed50659c59b75 /test/sql/test_case_statement.py
parente1d09859c55576f507e75960504719d17a46779c (diff)
downloadsqlalchemy-444abbe84722e52ff453542e65a6d8e2208cbc50.tar.gz
- got firebird running
- add some failure cases - [bug] Firebird now uses strict "ansi bind rules" so that bound parameters don't render in the columns clause of a statement - they render literally instead. - [bug] Support for passing datetime as date when using the DateTime type with Firebird; other dialects support this.
Diffstat (limited to 'test/sql/test_case_statement.py')
-rw-r--r--test/sql/test_case_statement.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/sql/test_case_statement.py b/test/sql/test_case_statement.py
index 994016c2f..7b8ae88db 100644
--- a/test/sql/test_case_statement.py
+++ b/test/sql/test_case_statement.py
@@ -98,8 +98,10 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL):
assert_raises(exc.ArgumentError, case, [("x", "y")])
- self.assert_compile(case([("x", "y")], value=t.c.col1), "CASE test.col1 WHEN :param_1 THEN :param_2 END")
- self.assert_compile(case([(t.c.col1==7, "y")], else_="z"), "CASE WHEN (test.col1 = :col1_1) THEN :param_1 ELSE :param_2 END")
+ self.assert_compile(case([("x", "y")], value=t.c.col1),
+ "CASE test.col1 WHEN :param_1 THEN :param_2 END")
+ self.assert_compile(case([(t.c.col1 == 7, "y")], else_="z"),
+ "CASE WHEN (test.col1 = :col1_1) THEN :param_1 ELSE :param_2 END")
def test_text_doesnt_explode(self):
@@ -113,10 +115,16 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL):
))]).order_by(info_table.c.info),
]:
- eq_(s.execute().fetchall(), [
- (u'no', ), (u'no', ), (u'no', ), (u'yes', ),
- (u'no', ), (u'no', ),
- ])
+ if testing.against("firebird"):
+ eq_(s.execute().fetchall(), [
+ ('no ', ), ('no ', ), ('no ', ), ('yes', ),
+ ('no ', ), ('no ', ),
+ ])
+ else:
+ eq_(s.execute().fetchall(), [
+ ('no', ), ('no', ), ('no', ), ('yes', ),
+ ('no', ), ('no', ),
+ ])