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)])