From 60841c65676941cd26d91cc6b704bd4c67fe2cb9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 24 Dec 2010 15:54:01 +0100 Subject: [PATCH] Added regression test on bool adaptation. --- tests/types_basic.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/types_basic.py b/tests/types_basic.py index b9d34437..4591290b 100755 --- a/tests/types_basic.py +++ b/tests/types_basic.py @@ -68,6 +68,12 @@ class TypesBasicTests(unittest.TestCase): self.failUnless(abs(s - 19.10) < 0.001, "wrong float quoting: " + str(s)) + def testBoolean(self): + x = self.execute("SELECT %s as foo", (False,)) + self.assert_(x is False) + x = self.execute("SELECT %s as foo", (True,)) + self.assert_(x is True) + def testDecimal(self): if sys.version_info[0:2] >= (2, 4): s = self.execute("SELECT %s AS foo", (decimal.Decimal("19.10"),))