mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Fixed tests to run on Windows.
This commit is contained in:
parent
92ee893f0f
commit
11c021cb21
|
@ -87,7 +87,8 @@ conn.close()
|
|||
pids[name] = int(self.notify(name).communicate()[0])
|
||||
|
||||
self.assertEqual(0, len(self.conn.notifies))
|
||||
self.assertEqual(extensions.POLL_OK, self.conn.poll())
|
||||
for i in range(10):
|
||||
self.assertEqual(extensions.POLL_OK, self.conn.poll())
|
||||
self.assertEqual(3, len(self.conn.notifies))
|
||||
|
||||
names = dict.fromkeys(['foo', 'bar', 'baz'])
|
||||
|
|
|
@ -80,6 +80,13 @@ class TypesBasicTests(unittest.TestCase):
|
|||
self.failUnless(type(s) == decimal.Decimal, "wrong decimal conversion: " + repr(s))
|
||||
|
||||
def testFloat(self):
|
||||
try:
|
||||
float("nan")
|
||||
except ValueError:
|
||||
import warnings
|
||||
warnings.warn("nan not available on this platform")
|
||||
return
|
||||
|
||||
s = self.execute("SELECT %s AS foo", (float("nan"),))
|
||||
self.failUnless(str(s) == "nan", "wrong float quoting: " + str(s))
|
||||
self.failUnless(type(s) == float, "wrong float conversion: " + repr(s))
|
||||
|
|
Loading…
Reference in New Issue
Block a user