summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/test_notify.py3
-rwxr-xr-xtests/types_basic.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_notify.py b/tests/test_notify.py
index 83c1061..8dd8c70 100755
--- a/tests/test_notify.py
+++ b/tests/test_notify.py
@@ -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'])
diff --git a/tests/types_basic.py b/tests/types_basic.py
index 95adc7d..aee4754 100755
--- a/tests/types_basic.py
+++ b/tests/types_basic.py
@@ -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))