mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Work around a 2to3 next fixer bug in a test
This commit is contained in:
parent
1a0c494417
commit
9e9c221637
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user