Added test to check issue #40

This commit is contained in:
Daniele Varrazzo 2011-02-12 19:56:49 +00:00
parent 9cb72a38da
commit 4c336a51bc
2 changed files with 5 additions and 0 deletions

2
NEWS
View File

@ -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

View File

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