From aa62a3a83387d4b346731e199b2cbe386193c91b Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 16 Jan 2011 13:05:18 -0500 Subject: - factor consistent set_isolation_level(), get_isolation_level() per-connection methods for sqlite, postgresql, psycopg2 dialects - move isolation test suite to test engines/test_transaction - preparing for [ticket:2001] --- test/dialect/test_postgresql.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'test/dialect/test_postgresql.py') diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 083d32b15..f8ca65e60 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -1382,40 +1382,6 @@ class MiscTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): ]) - @testing.fails_on('postgresql+pypostgresql', - 'pypostgresql bombs on multiple calls') - def test_set_isolation_level(self): - """Test setting the isolation level with create_engine""" - - eng = create_engine(testing.db.url) - eq_(eng.execute('show transaction isolation level').scalar(), - 'read committed') - eng = create_engine(testing.db.url, - isolation_level='SERIALIZABLE') - eq_(eng.execute('show transaction isolation level').scalar(), - 'serializable') - - # check that it stays - conn = eng.connect() - eq_(conn.execute('show transaction isolation level').scalar(), - 'serializable') - conn.close() - - conn = eng.connect() - eq_(conn.execute('show transaction isolation level').scalar(), - 'serializable') - conn.close() - - eng = create_engine(testing.db.url, isolation_level='FOO') - if testing.db.driver == 'zxjdbc': - exception_cls = eng.dialect.dbapi.Error - elif testing.db.driver == 'psycopg2': - exception_cls = exc.InvalidRequestError - else: - exception_cls = eng.dialect.dbapi.ProgrammingError - assert_raises(exception_cls, eng.execute, - 'show transaction isolation level') - @testing.fails_on('+zxjdbc', 'psycopg2/pg8000 specific assertion') @testing.fails_on('pypostgresql', 'psycopg2/pg8000 specific assertion') -- cgit v1.2.1