From 4c336a51bc2d00499f645ab09b17deae1e203cc2 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 12 Feb 2011 19:56:49 +0000 Subject: [PATCH] Added test to check issue #40 --- NEWS | 2 ++ tests/types_basic.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 74139322..2d78c479 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,8 @@ What's new in psycopg 2.4 available. - Added missing icon to ZPsycopgDA package, not available in Zope 2.12.9 (ticket #30). Bug report and patch by Pumukel. + - Fixed conversion of negative infinity (ticket #40). Bug report and patch + by Marti Raudsepp. What's new in psycopg 2.3.2 diff --git a/tests/types_basic.py b/tests/types_basic.py index c1392b75..43bae933 100755 --- a/tests/types_basic.py +++ b/tests/types_basic.py @@ -113,6 +113,9 @@ class TypesBasicTests(unittest.TestCase): self.failUnless(str(s) == "inf", "wrong float quoting: " + str(s)) self.failUnless(type(s) == float, "wrong float conversion: " + repr(s)) + s = self.execute("SELECT %s AS foo", (float("-inf"),)) + self.failUnless(str(s) == "-inf", "wrong float quoting: " + str(s)) + def testBinary(self): if sys.version_info[0] < 3: s = ''.join([chr(x) for x in range(256)])