mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Fixed test to run on Python <= 2.5
tuple.index() is not available on these versions.
This commit is contained in:
parent
0eb5e0430e
commit
3aad3d3143
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user