From 3aad3d3143a8e5963b06b8905a040521d3c3bcaa Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 3 Jun 2011 09:31:06 +0100 Subject: [PATCH] Fixed test to run on Python <= 2.5 tuple.index() is not available on these versions. --- tests/test_connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_connection.py b/tests/test_connection.py index e62e51e3..dc3cfb00 100755 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -204,13 +204,13 @@ class IsolationLevelsTestCase(unittest.TestCase): conn = self.connect() curs = conn.cursor() - levels = ( + levels = [ (None, psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT), ('read uncommitted', psycopg2.extensions.ISOLATION_LEVEL_READ_UNCOMMITTED), ('read committed', psycopg2.extensions.ISOLATION_LEVEL_READ_COMMITTED), ('repeatable read', psycopg2.extensions.ISOLATION_LEVEL_REPEATABLE_READ), ('serializable', psycopg2.extensions.ISOLATION_LEVEL_SERIALIZABLE), - ) + ] for name, level in levels: conn.set_isolation_level(level)