diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-16 13:05:18 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-16 13:05:18 -0500 |
commit | aa62a3a83387d4b346731e199b2cbe386193c91b (patch) | |
tree | ec6e2dc4b5c22fa27beda0ecc4e52cf74c476058 /test/dialect/test_postgresql.py | |
parent | 8ca1e580324ca477951edb71ef6fab8cba68530a (diff) | |
download | sqlalchemy-aa62a3a83387d4b346731e199b2cbe386193c91b.tar.gz |
- 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]
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r-- | test/dialect/test_postgresql.py | 34 |
1 files changed, 0 insertions, 34 deletions
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') |