From 9e9c22163706b0fffb9da67fe50ea23f91fe1c72 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 11 Feb 2011 17:54:41 +0000 Subject: [PATCH] Work around a 2to3 next fixer bug in a test --- tests/test_cursor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cursor.py b/tests/test_cursor.py index 292b824d..0983fbb3 100755 --- a/tests/test_cursor.py +++ b/tests/test_cursor.py @@ -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))