diff options
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r-- | test/dialect/test_postgresql.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 86b3617ab..a605594d4 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -1325,9 +1325,23 @@ class MiscTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): 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, |