Merge branch 'devel' of git://github.com/dvarrazzo/psycopg into devel

This commit is contained in:
Jason Erickson 2011-02-11 13:37:19 -07:00
commit ed42746027

View File

@ -136,9 +136,9 @@ class CursorTests(unittest.TestCase):
# timestamp will not be influenced by the pause in Python world.
curs.execute("""select clock_timestamp() from generate_series(1,2)""")
i = iter(curs)
t1 = i.next()[0]
t1 = (i.next())[0] # the brackets work around a 2to3 bug
time.sleep(0.2)
t2 = i.next()[0]
t2 = (i.next())[0]
self.assert_((t2 - t1).microseconds * 1e-6 < 0.1,
"named cursor records fetched in 2 roundtrips (delta: %s)"
% (t2 - t1))